Skip to content

rfc: composable GQ without a language break - #1244

Draft
aaltshuler wants to merge 2 commits into
ModernRelay:mainfrom
aaltshuler:codex/composable-gq-rfc
Draft

aaltshuler wants to merge 2 commits into
ModernRelay:mainfrom
aaltshuler:codex/composable-gq-rfc

Conversation

@aaltshuler

Copy link
Copy Markdown
Contributor

Proposes an additive alternative to #1202 and #1213: scalar bindings, nested read relations, and file-local named-read reuse within the existing GQ query structure. Existing queries retain their syntax, effects, result contracts, and ranking behavior.

The retrieval design distinguishes filtering a fixed candidate window from selecting the best qualifying results across the full eligible population. An uncapped squared_l2 scorer composes with ordinary filtering, ordering, and a final limit. The RFC specifies numerical/null behavior, exact stopping, explicit cut boundaries, shared resource limits, and scoped ranking metadata. Its acceptance fixture returns ten qualifying documents where filtering an exact nearest-100 window returns none.

Includes compatibility gates, test ownership, staged rollout, and source inspection against the current Lance 13 / DataFusion 54 base. Registers the RFC as a draft; this PR implements no language or runtime changes and claims no executable syntax or performance proof.

Validation:

  • Documentation checker: passed (453 Markdown files).
  • AGENTS/documentation index check: passed.
  • Spelling and staged whitespace checks: passed.
  • Independent design review of retrieval semantics and compatibility with current main completed; numerical failure preservation and root ranking metadata incorporated.

No Rust tests were run because this is a design-document-only change. New syntax and implementation acceptance tests remain explicit RFC gates.

@ragnorc

ragnorc commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Thank you for this. The maintainer accepted compositional closure on 2026-11-03, and the single GQ 3 RFC, #1302, now carries it: three value kinds, one binder (let), relation expressions drawn with from, and a composed core. Where this draft and the RFC differ, the RFC's Alternatives table names the row: let … in and positional tuples against from with columns by name; squared_l2 beside nearest against l2 and nearest as two operators for two contracts; no reserved forms and no break against one break of seven machine-applied spellings. Your 100-and-11 fixture is in the before-and-after corpus, and the root-versus-producer ranking metadata and the numerical contract are taken. Leaving this open for your reply; it can close once you have read the RFC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants