Skip to content

Keep the span of a keyword alias on an ASOF JOIN table - #152

Closed
kvlonge wants to merge 1 commit into
mainfrom
fix/keyword-table-alias-span
Closed

kvlonge wants to merge 1 commit into
mainfrom
fix/keyword-table-alias-span

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

A keyword used as the alias of an ASOF JOIN table before MATCH_CONDITION (… ASOF JOIN y OFFSET MATCH_CONDITION (…), likewise LIMIT) became an identifier with no span, so a located parse could not point at it. parse_join_table_suffix now gives the alias the span of its token.

  • Regression test: a new test_located row for SELECT * FROM x ASOF JOIN y OFFSET MATCH_CONDITION (x.t >= OFFSET.t). It fails on main with "the node has no span" and passes with the fix.
  • cargo test -p sqlquack-syntax: all pass. cargo fmt --check: clean.
  • Fingerprint check: syntax-coverage built separately from main eaf17f6 and from this head (binaries differ). The two snapshots are equal in every field except parser_tree (7fa8e1ec → 69c7c6be). diff, stale and summary exit 0, so no verdict, obligation or review entry changes.

Landing waits for a merge slot; the full gate runs on the merged head then.

A keyword such as OFFSET or LIMIT used as the alias of an ASOF JOIN table,
before MATCH_CONDITION, became an identifier with no span, so a located parse
could not point at it. It now carries the alias token's span.
kvlonge added a commit that referenced this pull request Nov 7, 2026

kvlonge commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

Closing: SQLQuack lands through local-gate trains, not PR merges (D94), so open PRs only add clutter (D628/D630). The branch is kept. Any work here that isn't on main yet is tracked by the train owner and lands through a train.

@kvlonge kvlonge closed this Nov 8, 2026
@kvlonge
kvlonge deleted the fix/keyword-table-alias-span branch November 9, 2026 21:31
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.

1 participant