Skip to content

Parse the Disagreement-list receipts in B's families - #82

Closed
kvlonge wants to merge 4 commits into
mainfrom
fix/disagree-b1
Closed

kvlonge wants to merge 4 commits into
mainfrom
fix/disagree-b1

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Fixes the auditor's Disagreement list (abd037f) in B's families: scripting, expressions, functions, transaction/session and utility. Each change is backed by Snowflake receipts.

  • Empty calls: a known function called with empty parentheses parses in Snowflake (errno 938 is semantic). When a typed function's own parse fails on name ( ), the faithful Snowflake parse now keeps a plain call. Keyword-syntax names (CAST, EXTRACT, TRIM, ...) are excluded until receipts cover them.
  • CAST: casting to a bare PRECISION or VARYING is a syntax error (1003, import 159).
  • EXECUTE: EXECUTE DCM PROJECT takes DEPLOY/PLAN/PREVIEW. EXECUTE needs a known kind, and EXECUTE IMMEDIATE needs a statement.
  • Session and variables: ALTER SESSION SET needs an assignment with a value and takes space-separated assignments. SET needs a non-reserved name.
  • SHOW PARAMETERS: takes IN USER [name], and IN TABLE takes an object name.
  • CREATE EXPERIMENT: CREATE EXPERIMENT ... TYPE is typed, and CREATE TYPE = without a kind is refused.

Receipt-direct check against main 292aca7 (catalogue 49fa3df, evidence cd8b9c6): contradicted receipts go from 5,071 to 4,788 (283 fixed), 0 new, and 194 obligations are gained. Still open: receiver-less !SPCS_* calls and the keyword-syntax empty calls, which wait for captures.

Snowflake receipts disagree with the parser on these statements:

- A known function called with empty parentheses parses in Snowflake (errno
  938 is semantic). When a typed function's own parse fails on `name ( )`,
  the faithful Snowflake parse now keeps a plain call. Keyword-syntax names
  (CAST, EXTRACT, TRIM, ...) are excluded until receipts cover them.
- CAST to a bare PRECISION or VARYING is a syntax error (1003, import 159).
- EXECUTE DCM PROJECT takes DEPLOY [AS], PLAN [DELTA] ... [OUTPUT_PATH] and
  PREVIEW ... USING CONFIGURATION ... FROM [LIMIT]; EXECUTE needs a known
  kind; EXECUTE IMMEDIATE needs a statement, string, variable or FROM path.
- ALTER SESSION SET needs an assignment with a value and takes assignments
  separated by spaces; SET needs a non-reserved variable name.
- SHOW PARAMETERS takes IN USER [name]; IN TABLE takes an object name.
- CREATE EXPERIMENT ... TYPE = ... [FROM SPECIFICATION] is a typed
  CreateObject, and CREATE <name> TYPE = without a kind is refused.

Against 56,748 receipted statements at evidence cd8b9c6: 283 now match,
0 regress. Receiver-less `!SPCS_*` calls stay unparsed.
Import 160 records them as syntax errors (1003); SUBSTR, SUBSTRING,
NORMALIZE, LTRIM, CONVERT, OVERLAY and TRIM parse empty and fail
semantically (938, 2139), so they now take the plain-call fallback.

kvlonge commented Nov 8, 2026

Copy link
Copy Markdown
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.

@kvlonge kvlonge closed this Nov 8, 2026
@kvlonge
kvlonge deleted the fix/disagree-b1 branch November 9, 2026 21:31
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