Skip to content

fix(syntax): read more Snowflake object statements as the receipts record - #218

Merged
kvlonge merged 9 commits into
mainfrom
fix/syntax-pool-20
Nov 13, 2026
Merged

kvlonge merged 9 commits into
mainfrom
fix/syntax-pool-20

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Why

Recorded Snowflake verdicts disagreed with the parser on more object statements. Each fix follows a receipt, and the disagreements list only shrinks.

Changes

  • ALTER EXTERNAL CONSUMER takes ADD, MODIFY, REMOVE and ROTATE of a programmatic access token, and SET and UNSET.
  • CREATE AI FUNCTION gets the CREATE FUNCTION checks; CREATE FUNCTION takes FROM EXPERIMENT <name> RUN <name>.
  • EXECUTE IMMEDIATE checks its source before keeping it as text: a string, a $ or : variable, or a || concatenation of them.
  • DEFINE keeps tags, pipes and code bundles as DEFINE text after the shape checks; a pipe's body is AS COPY, a code bundle needs FROM, and DEFINE FILE FORMAT takes no TEMPORARY, TEMP or VOLATILE.
  • NOTEBOOK PROJECT needs FROM; CREATE ORGANIZATION PROFILE is checked clause by clause; failover and replication groups refuse quoted names and integration types.
  • SHOW SERVICES takes EXCLUDE JOBS, IN COMPUTE POOL and a trailing OF TYPE list; SHOW TASKS takes ROOT ONLY.
  • CREATE SNAPSHOT needs FROM SERVICE, VOLUME and INSTANCE.
  • An unnamed ALTER USER refuses RENAME TO, ENROLL MFA, and SET or UNSET of a policy or tag.
  • CREATE EXTERNAL AGENT keeps EXTERNAL in its text and takes only WITH VERSION.
  • An Openflow connector adds a version from a location string, or a live version from LAST.
  • ORGANIZATION USER GROUP is a property-only kind.

Verification

  • Coverage diff: 260 disagreements cleared (878 to 618), none added, no unlisted contradictions.
  • Crate tests, clippy and fensu check pass.
  • One review of the full diff; its three findings are fixed, and a follow-up pass confirmed them.
  • make check-ci passes on the final head.

… and DEFINE of tags, pipes and code bundles as Snowflake does

ALTER EXTERNAL CONSUMER takes its token actions and SET and UNSET, and
CREATE EXTERNAL CONSUMER keeps its kind. CREATE AI FUNCTION is checked
as the CREATE FUNCTION it mirrors, and a function may come FROM
EXPERIMENT <name> RUN <name>. EXECUTE IMMEDIATE checks its source, its
USING list and FROM's arguments and DRY_RUN. DEFINE takes a tag, pipe
or code bundle, a pipe's body is AS COPY, and a code bundle needs FROM.
…n, EXECUTE IMMEDIATE and DEFINE fixes cleared
…name properties as Snowflake does

CREATE NOTEBOOK PROJECT needs FROM and may leave out its database, and
PROJECT alone is no kind. CREATE ORGANIZATION PROFILE takes an AS
manifest string or a FROM stage path with a named VERSION, then
PUBLISH. A failover or replication group refuses a string as a value
that names objects, and a quoted integration type.
…ORMAT modifiers

SHOW SERVICES now takes the Snowflake SHOW clauses with EXCLUDE JOBS,
OF TYPE and IN COMPUTE POOL. CREATE SNAPSHOT needs FROM SERVICE, VOLUME
and INSTANCE before its options, and DEFINE FILE FORMAT refuses
TEMPORARY, TEMP and VOLATILE, as the recorded receipts show.
…licy or tag

ALTER USER may still leave the name out to set or unset properties,
reset the password, abort queries or manage credentials, as the
recorded receipts show, but Snowflake refuses RENAME TO, ENROLL MFA
and SET or UNSET of a policy or tag without one.
…and user fixes cleared

The receipt disagreements fall from 746 to 646 entries, none added, and
the baseline is snapshotted against the same pinned evidence.
…ts and organization user groups

CREATE EXTERNAL AGENT keeps EXTERNAL in its text and takes only WITH
VERSION after its name. An Openflow connector adds a version from a
location string or a live version from LAST. SHOW TASKS takes ROOT ONLY
after STARTS WITH, and ORGANIZATION USER GROUP is a property-only kind,
as the recorded receipts show.
…sk and user group fixes cleared

The receipt disagreements fall from 646 to 618 entries, none added.
…INE in DEFINE text

EXECUTE IMMEDIATE takes a :bound variable and a || concatenation of
strings and variables, as Snowflake documents. A DEFINE kept as text now
says DEFINE rather than CREATE, and SHOW SERVICES reads OF TYPE as a list
after LIMIT, where the documented grammar places it.
@kvlonge
kvlonge enabled auto-merge November 13, 2026 07:25
@kvlonge
kvlonge added this pull request to the merge queue Nov 13, 2026
Merged via the queue into main with commit 4938fa7 Nov 13, 2026
9 checks passed
@kvlonge
kvlonge deleted the fix/syntax-pool-20 branch November 13, 2026 08:38
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