Skip to content

Fix the 53 receipts #68 contradicted; keep USE SCHEMA name parts - #72

Merged
kvlonge merged 9 commits into
mainfrom
fix/r68-contradictions
Nov 5, 2026
Merged

kvlonge merged 9 commits into
mainfrom
fix/r68-contradictions

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Stacked on #71 (D141 receipt-direct check), which this branch contains.

r68 (coordinator D141 follow-up). D141's check found 53 receipts that #68 (4203044 → cbe394e) newly contradicts, including the auditor's 27. All 53 now agree with their receipts:

  • routine arguments and RETURNS TABLE columns may omit name or type (Snowflake 90201/90214, also for DEFINE per import 137);
  • SHOW GRANTS OF/TO/ON with a kind word as name or an empty kind;
  • ALTER DYNAMIC TABLE: nameless SET, empty UNSET TAG, nameless SET TAG, empty row access policy columns, string DROP SEARCH OPTIMIZATION target (each narrowed to the actions Snowflake parses: the column-level and storage-lifecycle variants stay refused per their 1003 receipts);
  • CREATE TASK: $$ values, name tag values, AFTER refused after EXECUTE AS USER;
  • CREATE EXPERIMENT without TYPE; comma-separated STAGE / FILE FORMAT options;
  • backtick identifiers refused in faithful Snowflake modes; CREATE OR ALTER / DEFINE SEQUENCE refuses a reserved name part.

Probe over all 59,153 receipted statements (catalogue 8c9639e, evidence a82d976): 98 statements fixed, 0 newly contradicted.

USE SCHEMA (D118 on 58b3331). The Use node now lists a qualified name's parts with their own quoting in faithful Snowflake modes, so "v1 Q" . v1 and "v1 Q.v1" differ.

Gate result follows in a comment.

…radictions (D141)

The snapshot's case lists only reach receipts through catalogue forms, so a
receipt on a retired or uncited case id never counted. The check now judges
every current receipt by its statement (SQL, setup and session), with SQL from
the citing case or from the hash-checked inputs of the run reports, and records
receipt_contradictions and unjudged_receipts in the snapshot. diff fails on a
contradiction the base did not have; documented (D113) ones go on their own
non-failing line (D135), and existing ones are listed without failing.

On catalogue 8c9639e and evidence a82d976, 4203044 -> cbe394e reports 53 new
contradictions, including all 27 the D118 audit of #68 found, plus the 68
documented flips on their own line.
Snowflake receipts show the parser over-rejecting or over-accepting these
statements since #68:

- Routine arguments and RETURNS TABLE columns may omit their name or type;
  Snowflake parses them and fails semantically (90201, 90214), including
  for DEFINE (import 137). The routine argument check is removed and the
  untyped-column check of tables is limited to non-external tables.
- SHOW GRANTS OF/TO/ON reads a trailing kind word as the name and takes an
  empty kind before ; or LIMIT.
- ALTER DYNAMIC TABLE may omit the name before SET <property> =, take an
  empty UNSET TAG, a nameless SET TAG = '<value>', an empty row access
  policy column list and a string DROP SEARCH OPTIMIZATION target.
- CREATE TASK takes dollar-quoted property values and name tag values, and
  refuses AFTER once EXECUTE AS USER was read.
- CREATE EXPERIMENT may omit TYPE before FROM SPECIFICATION.
- CREATE STAGE and FILE FORMAT options may be comma-separated.
- Backtick-quoted identifiers are refused in faithful Snowflake modes.
- CREATE OR ALTER / DEFINE SEQUENCE refuses a reserved name part.
USE SCHEMA "v1 Q" . v1 and USE SCHEMA "v1 Q.v1" parsed to the same tree,
since the two parts were joined into one name with a single quoted flag.
In faithful Snowflake modes the Use node now also lists the parts of a
qualified name, each with its quoting (D118 on 58b3331).
# Conflicts:
#	crates/sqlquack-syntax/src/parser/_helpers/ddl/snowflake_show.rs
@kvlonge
kvlonge merged commit abd037f into main Nov 5, 2026
1 check passed

kvlonge commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Landed via D94: main = abd037f (fast-forward from 8085c5b). Gate make check-merge RECORDER=0 exit 0 on the exact head abd037f. Tree a1628e77 on both main and the head.

Coverage diff, main 8085c5b + D141 → head (catalogue 8c9639e, evidence a82d976, full receipt set):

Merge note: #76 reworked SHOW GRANTS OF/ON in snowflake_show.rs. I took C's version, which covers the same r68 cases, and dropped my duplicate helpers.

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