Skip to content

feat(convert): run FULL JOIN USING after a JOIN without ON left to right - #191

Merged
kvlonge merged 3 commits into
mainfrom
feat/convert-full-join-using-after-cross-join
Nov 12, 2026
Merged

kvlonge merged 3 commits into
mainfrom
feat/convert-full-join-using-after-cross-join

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Why

sqlquack convert refused a FULL JOIN ... USING that follows a JOIN without ON, because nobody had recorded how Snowflake binds it. The recorded cases now show that Snowflake binds it to the whole join so far, the same as a later ON. So the conversion can run it left to right, and the refusal only blocks valid SQL.

Changes

  • The conversion no longer refuses FULL JOIN ... USING after a JOIN without ON, and the rule text says so. RIGHT JOIN with USING and RIGHT JOIN without ON stay refused.
  • The CLI join test expects the recorded row count from the USING value case.
  • The translation results baseline gains the two recorded USING statements: FULL JOIN ... USING now matches, and RIGHT JOIN ... USING is refused. Nothing regressed. The SQL size baseline gains the one that converts.
  • Evidence is pinned to d3db2e7f, which adds the USING results and the receipts for replication that is not enabled for the account. Those receipts make 101 more security_admin not-submitted entries stale, so they are removed under the checker rule from fix(syntax-coverage): fail on a not-submitted entry whose case has a receipt #190. Marks and the syntax baseline are re-recorded.
  • CHANGELOG.md lists fix(syntax-coverage): fail on a not-submitted entry whose case has a receipt #190's not-submitted rule under 0.6.0, which shipped it without the line.

Satisfied obligations in the syntax baseline:

Satisfied
main 77,751
this branch 77,856

None are lost.

Verification

  • The CLI join tests pass with the new expectation.
  • syntax-coverage snapshot: 3,479 forms, 0 problems.
  • make verify-recorded: 12,258 cases, 0 failed; 230 of 230 equivalences and rules verified; make sql-sizes passes.
  • make check-ci passes.

…ot_submitted entries

Pins evidence d3db2e7f, which adds the receipts for replication that is
not enabled for the account and the JOIN without ON results. 101
security_admin not_submitted entries now list a case with a receipt, so
they are removed; marks and the baseline are regenerated.
Snowflake binds a later FULL JOIN ... USING to the whole join so far,
as it does a later ON: after a join without ON, the recorded cases return
the left-to-right row count, not the nested one. The conversion no longer
refuses that shape. RIGHT JOIN with USING and RIGHT JOIN without ON stay
refused. The recorded cases are in the pinned evidence, and the translation
results baseline gains their two statements, and the SQL size baseline the
one that now converts.
0.6.0 ships it, but Release Please could not update the release pull
request while it was queued, so its line was missing.
@kvlonge
kvlonge force-pushed the feat/convert-full-join-using-after-cross-join branch from 33498ae to 8de4ed4 Compare November 12, 2026 04:10
@kvlonge
kvlonge added this pull request to the merge queue Nov 12, 2026
Merged via the queue into main with commit 55e338c Nov 12, 2026
14 checks passed
@kvlonge
kvlonge deleted the feat/convert-full-join-using-after-cross-join branch November 12, 2026 05:22
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