Repository navigation
feat(syntax-coverage): give each repeated Snowflake list item its own obligations and fix the list parser bugs they found - #227
Merged
Conversation
…tive renders the same SQL A positive whose only SQL is documented SQL that Snowflake refuses is now observed like that SQL, instead of counting as accepted. The documented refusal it coincides with is therefore kept, where before it was withdrawn as SQL the grammar also accepts. Regenerated obligations: 24 added across 6 ddl forms, none removed or changed. Validation: obligation and grammar script tests, including a test that fails without the change; fensu reports no faults.
… missing, class and wrong-kind obligations The obligation walk now descends into a list continuation such as [ , <x> ... ], so the second item gets the obligations the first one has. Its positive is the minimal case with that list continued, and a case that drops an item keeps the separator before it. Regenerated obligations: 3,396 added across 489 forms, none removed or changed; 70 more withdrawn as SQL another obligation already covers. Validation: obligation and grammar script tests, including a list-item test that fails without the walk; fensu reports no faults.
Value lists, tuples, integration and organization property lists, SET and UNSET properties, routine and resource SET properties, external table file format options, view row access policy columns, USE SECONDARY ROLES, ORDER BY and DESCRIBE argument types accepted a comma with nothing after it. The second-list-item receipts show Snowflake refuses each one as a syntax error, while the same lists with an item after every comma still parse. The two ORDER BY receipts this resolves leave the disagreement list.
Snowflake runs BEGIN NULL ; ; END ; and the same doubled semicolon in loop, branch, CASE and exception handler bodies, so the scripting body now skips extra semicolons after a member. A block that opens with a semicolon is still refused, as Snowflake refuses it.
Replication and failover group properties that list names, such as ALLOWED_SHARES and OBJECT_TYPES, take a single string, which Snowflake rejects only after parsing, but Snowflake refuses a string after a comma as a syntax error, in ALTER ... SET and in CREATE. CREATE also refuses a comma that ends a list before the next property, as Snowflake does.
…et maps HEADERS, SECRETS and WEBHOOK_HEADERS take a bare-word key only in their first entry: after a comma Snowflake refuses one as a syntax error. The check applies to routine properties, ALTER FUNCTION and PROCEDURE SET, CREATE property lists and ALTER INTEGRATION SET. Other key = value lists, such as tags, keep accepting word keys.
When the structured ALTER WAREHOUSE parse failed it fell back to raw text, so ALTER WAREHOUSE v1 UNSET TAG v1 , 'v1' was accepted although Snowflake refuses it. The structured parse now reports its error; all 210 recorded ALTER WAREHOUSE receipts still agree.
An untyped column read DEFAULT as a custom data type, so CREATE ICEBERG TABLE v1 ( v1 DEFAULT , v1 ) AS SELECT 1 parsed. Snowflake refuses an untyped column with DEFAULT, with or without a value.
COPY INTO v1 FROM ( SELECT $1 , . $1 FROM @s1 ) fell back to a raw command although Snowflake refuses it as a syntax error. The COPY grammar check now refuses a dot after a comma or SELECT, as it already did after a string or a reserved word.
Snowflake parses DEFINE TABLE ... ( v1 INT , ( v1 , v1 ) REFERENCES t ) and REFERENCES t without columns, but refuses columns after the referenced table. DEFINE TABLE now reads that element as an out-of-line constraint of kind REFERENCES, so the omitted keyword stays visible; CREATE TABLE keeps refusing it, as its receipts show. The two DEFINE TABLE receipts this resolves leave the disagreement list.
…lake parses and record the re-reviews Pin the evidence commit that holds the receipts for the second-list-item cases. Settle the 62 obligations whose derived negative Snowflake parses: 47 second list items it fails only later, and 15 omitted statements in a statement list, which leave an empty statement Snowflake runs. Regenerate the obligations and marks. Record the 266 forms approved under review brief version 1, each bound to its fingerprint and definition, and re-record the baseline: 3 forms are newly verified and 72 forms verified before are not, 59 of them rejected on re-review and 13 waiting on receipts.
kvlonge
enabled auto-merge
November 14, 2026 07:09
kvlonge
disabled auto-merge
November 14, 2026 07:12
…st item, and drop the parenthesis of an elided group Two list-item walk bugs rendered SQL that did not match its obligation: - In `( [ <x> ] [ , <x> ... ] )` the continuation's cases left the optional first item out, so `( 'm' )` and `( m1 )` stood for the second item. The walk now renders the first item whenever it walks the continuation that repeats it. - A missing `(` or `)` in an elided group such as `[ , ( ... ) ]` kept the parenthesis, because the group renders from a written clause. The dropped token is now removed from the written clause or repeat. Regenerated: 18 omit-item obligations return in 8 security_admin forms, VALUES and CREATE EXTERNAL VOLUME get their missing-parenthesis cases, and the two VALUES settles made from the old SQL are removed. 50 new cases await receipts, pinned at evidence 74ca5ca5; the baseline drops the 30 obligations whose claims rested on the old SQL.
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
A repeated Snowflake list item (
[ , <x> ... ]) had no case of its own for its second item, so reviewers could not confirm that the continued list parses and keeps each item. The new receipts also exposed parser bugs in lists and block bodies.Changes
;in blocks, strings in group name lists, string keys in header and secret maps, ALTER WAREHOUSE errors, DEFAULT on untyped columns, COPY columns starting with., DEFINE TABLE keyless REFERENCES. Disagreements 840 to 715, none new.(/)in an elided group drops it. 50 corrected cases in 10 forms await receipts.Verification
make check-cipasses on the final head;syntax-coverage diffexits 0.