Repository navigation
feat(convert): run JOIN without ON as a cross join and name more unaliased columns - #187
Merged
Merged
Conversation
kvlonge
force-pushed
the
feat/convert-join-without-on-and-column-names
branch
from
November 11, 2026 23:59
6309291 to
3a7e2ca
Compare
…iased columns JOIN, INNER JOIN, LEFT JOIN and FULL JOIN without ON convert to CROSS JOIN, as Snowflake runs them: no rows when either side is empty. A later RIGHT or FULL JOIN with ON applies to the whole join so far, as recorded. RIGHT JOIN without ON, and one before a FULL JOIN with USING, are unrecorded and stay refused. Unaliased SUBSTR, FLOOR, CEIL, NULLIF, TO_DATE and MONTH calls, empty text, $n positions and a one-key VARIANT path take the names Snowflake records for them. Pins evidence 3ee67fc2 and re-records the translation results, SQL sizes, the syntax baseline and marks, and the corpora.
kvlonge
force-pushed
the
feat/convert-join-without-on-and-column-names
branch
from
November 12, 2026 01:13
3a7e2ca to
132facf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
JOIN without ON, of any kind recorded, runs as a cross join. Unaliased SUBSTR, FLOOR, CEIL, NULLIF, TO_DATE and MONTH calls, empty text,
$nand a one-key VARIANT path get the column names Snowflake records.Changes
rule.join_cross. Outer joins without ON also give no rows when a side is empty. A later RIGHT or FULL JOIN with ON applies to the whole join so far, as recorded. RIGHT JOIN without ON, and one before a FULL JOIN with USING, are unrecorded and stay refused.'',$nandv:key.v:keyis named from the source after the column, as its node range stops there. Only an unquoted, unqualified column with one plain key is named; other paths still refuse with SQ0009.Playground corpora, converted SQL before and after: 41 of 2,962 statements go from refused to converted; none else changes.
SELECT ''''NULLIF(STATUS, 'SHIPPED')TO_DATE(ORDERED_AT)SELECT payload:page FROM eventsPAYLOAD:PAGESELECT $1 FROM orders$1... FROM orders o JOIN customers cCROSS JOIN "CUSTOMERS" AS "C"Verification
make check-cipasses.