Repository navigation
chore(syntax-coverage): fail on every receipt the parser contradicts - #202
Merged
Merged
Conversation
The syntax gate failed only on new flips, and a case marked documented was listed rather than failed, so a parser accepting SQL Snowflake refused as a syntax error could pass. Snowflake's receipt is the judge: check-syntax now fails on every receipted case the parser contradicts, in both directions and whatever its mark or expectation, unless the root's receipt-disagreements.toml lists it. The file lists today's disagreements by form and only shrinks: an entry the parser now agrees with fails until it is deleted, and an entry the target branch's copy does not have fails. Snowflake lists 2,359 accepted syntax errors, 479 refused parsed cases and 361 other receipts; SQLite 642 accepted syntax errors; DuckDB 5 refused parsed cases.
Snowflake's receipts decide syntax; a documented case whose own SQL is wrong tests nothing. Correct the documented hand rows the receipt triage found misrendered: VERIFIED_AT takes epoch seconds, a stage name with blanks is single-quoted whole, an Iceberg table with PARTITION BY defines its columns, ADD and RENAME FIELDS cast between OBJECT types inside the parentheses, account parameters are assigned, a REFERENCES column list stays in its group, and a select-list continuation names one item. Hand rows that spell variables or file column numbers in ways the pages never show are no longer documented. Pin the evidence that records the corrected cases, lift the two ALTER WAREHOUSE TABLES entries that now have receipts, and re-record the baseline and the Snowflake disagreements: of the corrected cases Snowflake parsed 18, all accepted; it refused 9 as syntax errors, 2 of which the parser accepts and lists.
…orded phase The importer decides each receipt's phase, placing an error as a syntax error only on evidence such as errno 1003 under the compilation prefix or a 1002 whose message starts with "syntax error". The checker kept its own list, errno 1003 or 921, so a syntax-phase receipt with any other errno counted as neither parsed nor refused, and the two could drift. The checker now treats every receipt the importer placed as a syntax error as Snowflake's refusal, whatever its errno. A 1003 at another phase still counts as neither. Two receipts the parser contradicts are new: ALTER WAREHOUSE ADD TABLES and DROP TABLES, refused with 1002 and accepted by the parser, now on the Snowflake disagreement list. Sixteen syntax-phase receipts with errno 1002, 4, 92107 or 510807 now count as refusals the parser agrees with. Satisfied obligations and verified forms are unchanged.
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
Snowflake's receipt judges the parser. The syntax gate failed only on new flips, so standing disagreements in either direction went unchecked.
Changes
syntax-coverage difffails on every receipt the parser contradicts, whatever its mark or expectation, unless the dialect'sreceipt-disagreements.tomllists it. The list only shrinks: an entry the target branch lacks fails, and so does one the parser now agrees with until it is deleted.NORMALIZE ( )with errno 938, as forSUBSTR ( ), so it has an undocumented NORMALIZE function.Verification
make check-cipasses.