Repository navigation
Conversation
… EXPERIMENT TYPE From recorded receipts: - PRECISION or VARYING alone as a type is a parse error in faithful modes (Snowflake 1003); DOUBLE PRECISION, CHARACTER VARYING and unknown type names (2040, a compile error) still parse. - TO_TIMESTAMP ( ) and the other expression-list conversion calls parse with no arguments in faithful modes, as Snowflake does (a compile error there). IDENTIFIER ( ) stays refused. - CREATE EXPERIMENT <name> TYPE = <value> [ FROM SPECIFICATION <text> ] is a parsed CreateObject instead of opaque text, so a missing FROM or SPECIFICATION is a parse error (1003). - CREATE <name> TYPE ... with no object kind is a parse error (1003).
…uard The coverage checker parsed with the syntax crate's default guard, which stops at 64 nested function calls, while every product parse allows 256 (sqlquack-core MAX_FUNCTION_CALL_DEPTH). Two documented 100-deep cases (ABS, COALESCE) that Snowflake and the product both accept were reported as local parse failures. The checker now uses the product's limit.
Snowflake parses SELECT !SPCS_CANCEL_JOB ( ) (receipt kffa979cc1d0a, errno 2139) and SELECT !SPCS_WAIT_FOR ( v1 , v1 ) (receipt kf2fa04c919eb, errno 904) and fails them at compile. Like ==, SQLQuack keeps refusing them at parse rather than add a model-attribute node with no instance.
The auditor upheld A's exclusions from the brq-execute-00 packet (coverage/syntax/audits/receipt-exclusions-brq-execute-00.toml on wip/syntax-omission-audit 325ea0f). Nine of the twelve held cases already had not_submitted entries. These three did not: SYSTEM$ENFORCE_PRIVATELINK_ACCESS_ONLY, SYSTEM$ENABLE_PREVIEW_ACCESS and SYSTEM$DISABLE_PREVIEW_ACCESS. Their o001 obligations now report as unverifiable_not_submitted instead of missing a receipt, and they stay in the denominator.
The parser names GROUPING SETS as a call with a space, so the statements file listed fn:GROUPING SETS, which form links cannot name: construct keys never hold whitespace. Function construct keys now replace spaces with underscores, giving fn:GROUPING_SETS.
verify --translation-statements stopped the whole file at the first recorded statement SQLQuack's parser refused. Such a statement is now written like any other, with its outcome and codes, its token spelling keys as its constructs, and an optional unparsed field holding the parse failure. syntax-coverage results reads the field. The three D151 cases that hit it (DATE_PART and EXTRACT with a quoted part before FROM, MINHASH with DISTINCT) are compile errors Snowflake rejects at parse, so SQLQuack's refusal agrees with Snowflake.
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. |
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.
Draft. Queue position (D213): after #91. Based on main 4f52a5b so its coverage numbers are measured cleanly; it will be merged up to main (no rebase) once #89–#91 have landed. The auditor reviews the 15 forms after it lands, because #89–#91 change the parser tree first.
Parser (crates/sqlquack-syntax, on the D118 re-read list)
CAST(x AS PRECISION)/AS VARYING: a lone second type word is SQ0001 in faithful modes (Snowflake 1003). DOUBLE PRECISION, CHARACTER VARYING and unknown names such as FOOBAR (2040, a compile error) still parse.TO_TIMESTAMP(),TRY_TO_TIMESTAMP()and the other expression-list conversion calls parse with no arguments in faithful modes, as Snowflake does (it fails them at compile).IDENTIFIER()stays refused. Convert refuses these calls.CREATE EXPERIMENT <name> TYPE = <value> [ FROM SPECIFICATION <text> ]is a parsed CreateObject, not opaque text, so a missing FROM or SPECIFICATION is a parse error (1003).CREATE <name> TYPE …with no object kind is 1003.==:SELECT !SPCS_CANCEL_JOB ( )(receipt kffa979cc1d0a, errno 2139) andSELECT !SPCS_WAIT_FOR ( v1 , v1 )(receipt kf2fa04c919eb, errno 904). Accepting them would need a method-call node with no instance; recorded in the parser tests.Checker
MAX_FUNCTION_CALL_DEPTH= 256) instead of the syntax crate's default 64. The product already accepts these statements, so the checker should judge them the same way. Closes the 100-deep ABS and COALESCE cases.Coverage data
Translation statements (D151 slice-1 blockers)
verify --translation-statementsno longer aborts the whole file when SQLQuack's parser refuses one recorded statement. That statement is written like any other (outcome, codes), with its token spelling keys as constructs and a new optionalunparsedfield holding the parse failure;syntax-coverage resultsreads it. The three D151 cases that hit it (DATE_PART and EXTRACT with a quoted part before FROM, MINHASH with DISTINCT) arecompile_errorcases Snowflake rejects at parse (1003), so SQLQuack's SQ0001 agrees with Snowflake and no parser change is needed.fn:GROUPING_SETS, which form links can name (construct keys never hold whitespace).Evidence
unreviewed: 15 (double, string, to-timestamp, try-to-timestamp, abs, coalesce, both ai-function create-experiment forms, 7 create-secret forms). Obligations 68,169 → 68,221 (+52, 0 lost).syntax-coverage diff coverage/syntax/baseline.jsonexits 0: forms_lost 0, syntax_error_cases_accepted 0, receipts_contradicted 0.