Repository navigation
fix(syntax): typed Snowflake ALTER of application, backup, Cortex Search, database, semantic view and Streamlit kinds - #45
Merged
Conversation
…ce kinds as a typed statement ALTER APPLICATION, APPLICATION PACKAGE, APPLICATION SERVICE, BACKUP SET, CORTEX SEARCH SERVICE, DATABASE, SEMANTIC VIEW and STREAMLIT parsed through the raw ALTER fallback, which accepted malformed statements. They now parse to AlterObject with the kind, IF EXISTS, the action words and its operands and properties, and reject missing operands, string or unquoted reserved names, and half of a multi-word kind (ALTER CORTEX SEARCH, ALTER SEMANTIC, ALTER BACKUP without SET).
A release directive's VERSION takes an identifier, a CONTACT purpose takes a contact name, and an UNSET value is a name, not a string. APPLICATION PACKAGE UNSET takes one property, and a database SET ends after a CONTACT list of several purposes.
Typed Vec bindings, named TAG/CONTACT constants, matches! or match for literal decisions, helpers that return the action suffix instead of mutating it, and a one-line module summary. Parsing is unchanged: the coverage family and diff output are byte-identical.
Conflicts were helper visibility (main's pub(super) kept) and the ddl module list (both modules kept).
Contributor
Author
|
Merged as 5581fa5 (merge of gated head cc519d5 into main c7fdc39; #44 touches no syntax code, and the merge's sqlquack-syntax tree equals the gated tree). D94 gate: |
kvlonge
added a commit
that referenced
this pull request
Nov 4, 2026
Basis: main 5581fa5 (PR #45), catalogue fc0c257, evidence b56cd49, parser tree 313718f. - No existing review went stale. - 69 of the 70 ddl forms PR #45 typed are approved after a page and raw-tree read; M2 agrees on every case. - Not approved: sf.ddl.alter-cortex-search.unset (all-optional UNSET positive rejected by Snowflake, identifier rows built on it). Checker at 5581fa5: valid, 3476 forms; 1310 of 3348 verified.
kvlonge
added a commit
that referenced
this pull request
Nov 4, 2026
…ding - D113 triage of imports 84-86 (evidence a1c9e0f; runs sa-20, sa-21 and sa-24). The join found 8 contradictions, all security_admin negatives that Snowflake parses. They become undocumented-acceptance rows (observe): - CREATE DATA MOVEMENT POLICY ENFORCE_RULES/ALERT_RULES ( 'v1' ): errno 2003 x2. - CREATE EXTERNAL ACCESS INTEGRATION with string rule, integration and secret names: runtime 509009 x3. - CREATE FEATURE POLICY BLOCKED_OBJECT_TYPES_FOR_CREATION ( 'INT' ): errno 1422. - CREATE [ OR ALTER ] DATABASE ROLE ; accepted x2. Snowflake reads these as CREATE DATABASE named ROLE. Lane A's per-case restore dropped that database. security_admin: reject->observe 8, with 128 observed stages updated. - d118c holds (lane A, packet d118-3296ca13): 42 not_submitted entries. - 32 cite alter-function.set kb29b5415441d and alter-procedure.set k65020488034f (credential or integration). - show-services o067 is the workload_type row renumbered by 3296ca1, still held in ux-08. - 9 are SYSTEM$SEND_EMAIL, SYSTEM$SEND_SNOWFLAKE_NOTIFICATION and SYSTEM$WAIT_FOR_SERVICES rows (out of account, or acting on services). The total is now 5,082: ddl 4,399, security_admin 603, functions 40, utility 40. - The two call-with.table-language-sql-as rows of d118c (k5fb30861c6ab, k65b59ea8cc0f) are added to held.jsonl, so they run in a run database, as the D113b rows do. - alter-cortex-search.unset: a reading makes PRIMARY KEY required (auditor, after #45). `UNSET ;` alone was a rejected positive, and its identifier rows were built on it. The join finds 0 contradictions in functions, utility, security_admin and ddl. Rebuilt with, for functions, utility, security_admin and ddl: uv run python -m scripts.build_syntax_obligations <family> uv run python -m scripts.build_syntax_cases --receipts <evidence a1c9e0f>/coverage/syntax/receipts --setups <evidence a1c9e0f>/coverage/syntax/receipts [--held coverage/syntax/held.jsonl for functions, utility] <family> Checked with main a2c64d6's checker on this catalogue plus evidence a1c9e0f: valid, 3476 forms, 48474 receipts.
Contributor
Author
This was referenced Nov 4, 2026
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.
Typed parsing for Snowflake ALTER of the application, backup, Cortex Search, database, semantic view and Streamlit kinds.
snowflake_alter_objectsmodule: ALTER APPLICATION, APPLICATION PACKAGE, APPLICATION SERVICE, BACKUP SET, CORTEX SEARCH SERVICE, DATABASE (including catalog-linked), SEMANTIC VIEW and STREAMLIT parse to a typedAlterObjectinstead of the opaque fallback.=value a name; a package UNSET takes one property; a database SET ends after a multi-purpose CONTACT list.snowflake_alterhelpers; merged with fix(syntax): parse Snowflake ALTER FUNCTION, PROCEDURE, SCHEMA, STAGE, SERVICE and 26 more kinds #40 (helper visibility kept at main'spub(super)).tests/parser/test_fixes.rs.Coverage (D122)
Checker diff against main 00e831a (catalogue 5f35885, receipts at wip/syntax-evidence 469edde): +70 ddl forms complete against the 67-form floor, 0 lost; +2,765 obligations;
syntax-coverage diffexit 0.By kind: APPLICATION* 26, DATABASE 17, BACKUP SET 10, CORTEX SEARCH 8, SEMANTIC VIEW 5, STREAMLIT 5 (counted before the #40 merge; one form fewer after it).
Gate (D94)
CARGO_BUILD_JOBS=1 make check-merge RECORDER=0 RUST_TEST_JOBS=1on head cc519d5: exit 0. Pre-gatefensu check(0 faults) andcargo clippy -D warningswere clean. main has since gained #44, which touches no syntax code and merges cleanly.