Skip to content

syntax: share Gap/Parsed and pick the checker's local parser per dialect - #136

Merged
kvlonge merged 1 commit into
mainfrom
wip/native-parser-hook
Nov 7, 2026
Merged

kvlonge merged 1 commit into
mainfrom
wip/native-parser-hook

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Shared groundwork for a second native dialect parser.

  • Gap and Parsed move from sqlquack-syntax-postgres into sqlquack-syntax (modes::models), unchanged in shape; the Postgres crate re-exports them, so its public API is the same.
  • The receipt checker maps each LocalParser to its verdict through local_verdict; the hidden parse-worker takes --parser <snowflake|postgres|none> instead of --postgres. A new dialect parser is one enum variant and one match arm.

No Snowflake path changes behaviour; the landing gate (check-ci, test-rust, Snowflake checker byte-identity with summary/stale, verify-recorded, results --against main, lineage) will be posted here.

… parser per dialect

Gap and Parsed move from sqlquack-syntax-postgres into sqlquack-syntax so a
second native dialect parser returns the same shape; the Postgres crate
re-exports them unchanged.

The receipt checker maps each LocalParser to its verdict through
local_verdict, and parse-worker takes --parser instead of --postgres, so a
new dialect parser is one enum variant and one match arm.

kvlonge commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor Author

Proof gate on the exact head dcefa3a7b05d980212871f22c960e73678c625b5 against main f2d93eec (its parent).

Step Result
make check-ci rc=0
make test-rust rc=0
Snowflake checker, 10 commands + summary/stale, main vs head 939/941 outputs byte-identical; snapshot differs only in catalogue_commit and the Snowflake parser_tree id (sqlquack-syntax's tree changes with the added types), translation.err only in the binary path
summary/stale []
sqlquack verify with recorded results, libduckdb loaded main and head both 12,033 cases, 0 failed; outputs byte-identical apart from paths
syntax-coverage results --against main's baseline 0 regressions, 0 other changes; results-baseline.json unchanged
Lineage diff 7,814 cases, lineage identical

Postgres figure unchanged: 1,384 of 1,555 forms (89.0%), 19,346 of 22,726 obligations, 0 problems (parser tree d95965e3; the tree id moves only because parse/models.rs left the crate).

Main has since moved; the landing re-merges main and re-gates the exact head.

kvlonge added a commit that referenced this pull request Nov 7, 2026
@kvlonge
kvlonge merged commit 96f01dd into main Nov 7, 2026
1 of 2 checks passed
@kvlonge
kvlonge deleted the wip/native-parser-hook branch November 9, 2026 21:32
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