Skip to content

fix(syntax): follow recorded verdicts on privileges, variables, warehouses, RESULTSET assignments and SHOW SERVICES - #219

Merged
kvlonge merged 10 commits into
mainfrom
fix/syntax-pool-21
Nov 13, 2026
Merged

kvlonge merged 10 commits into
mainfrom
fix/syntax-pool-21

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Why

Recorded Snowflake verdicts disagreed with the parser on more statements, including the RESULTSET, notebook and SHOW SERVICES questions left open by the last parser change. Each fix follows a receipt, and the disagreements list only shrinks.

Changes

  • SHOW ... WITH PRIVILEGES takes only grantable privilege names.
  • CREATE VARIABLE needs a type; its DEFAULT and COMMENT are checked.
  • DESC FUNCTION arguments may not open with a bare parenthesis, and TABLE ( ) is refused.
  • ALTER WAREHOUSE checks ADD/DROP TABLES, ABORT ALL QUERIES and what an unnamed warehouse may do; an Openflow connector takes PUSH [TO ''].
  • An event table refuses CONTACT.
  • LET r RESULTSET := ( EXECUTE IMMEDIATE :q [ USING ( ... ) ] ) parses: the command ends before the closing parenthesis.
  • A notebook may be named PROJECT again. The previous change turned CREATE NOTEBOOK project [FROM ...] from accepted to refused; Snowflake parses it, so this restores it.
  • SHOW SERVICES reads OF TYPE straight after the kind, where Snowflake takes it, instead of after LIMIT.
  • New recorded cases: 10 receipts, all agreeing with the parser.

Verification

  • Coverage diff: 35 disagreements cleared (618 to 583), none added, no unlisted contradictions; 4 more obligations met.
  • The RESULTSET assignment form loses its approval: its new EXECUTE IMMEDIATE cases parse, but EXECUTE IMMEDIATE is still an opaque command, which no positive obligation accepts.
  • Crate tests, clippy and fensu check pass.
  • One review of the full diff, then a follow-up pass on its fixes.
  • make check-ci passes on the final head.

A SHOW privilege list now names the privileges a GRANT takes, each
followed by a comma or the statement end, so a plain name is refused as
the recorded receipts show.
A variable needs an unquoted type after its name, DEFAULT needs a value
and COMMENT takes a string, as the recorded receipts show.
A DESCRIBE argument may not open with a bare parenthesis, and a TABLE
argument needs at least one column type, as the recorded receipts show.
…connector PUSH

ALTER WAREHOUSE ADD and DROP take TABLES and a list of named tables,
ABORT needs ALL QUERIES, the current warehouse cannot add or drop
tables, rename or tag itself, and UNSET takes names, not strings. An
Openflow connector pushes to a location string, as the recorded receipts
show.
An event table takes the table properties after its name except WITH
CONTACT, as the recorded receipts show.
…, warehouse and event table fixes cleared

The receipt disagreements fall from 618 to 583 entries, none added.
…TE, notebook name, event table contact and SHOW SERVICES questions
…ATE, notebook name, event table contact and SHOW SERVICES questions
…RVICES verdicts

An EXECUTE IMMEDIATE inside a parenthesised RESULTSET assignment now ends
before the closing parenthesis, so LET can take it. A notebook may be named
PROJECT when its name ends the statement or FROM follows. SHOW SERVICES reads
OF TYPE straight after the kind, where Snowflake accepts it, and refuses it
after IN.
…SHOW SERVICES fixes cleared

Every receipt of the batch agrees with the parser, so the disagreement list
stays at 583 entries, and four event table and SHOW SERVICES obligations are
now met. The RESULTSET assignment form loses its approval: its two new
EXECUTE IMMEDIATE cases parse, but EXECUTE IMMEDIATE is still kept as an
opaque command, which no positive obligation accepts, until it has a
structured node.
@kvlonge
kvlonge enabled auto-merge November 13, 2026 12:27
@kvlonge
kvlonge added this pull request to the merge queue Nov 13, 2026
Merged via the queue into main with commit d8b9c22 Nov 13, 2026
9 checks passed
@kvlonge
kvlonge deleted the fix/syntax-pool-21 branch November 13, 2026 13:34
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