Skip to content

Snowflake: warehouse tagging grammar (ALTER WAREHOUSE SET/UNSET TAG, CREATE WAREHOUSE ... WITH TAG) - #21

Merged
hovaesco merged 1 commit into
snowflake/create-stream-append-onlyfrom
lav-1595-warehouse-tags
Aug 12, 2026
Merged

Snowflake: warehouse tagging grammar (ALTER WAREHOUSE SET/UNSET TAG, CREATE WAREHOUSE ... WITH TAG)#21
hovaesco merged 1 commit into
snowflake/create-stream-append-onlyfrom
lav-1595-warehouse-tags

Conversation

@hovaesco

Copy link
Copy Markdown

Design

Supports warehouse tagging grammar for the snowflake-rs emulator (LAV-1595):

  • ALTER WAREHOUSE [IF EXISTS] <name> { SET TAG <t> = '<v>' [, ...] | UNSET TAG <t> [, ...] } — routed through parse_alter_object_set_tags via a maybe_parse mirror of the ALTER SCHEMA tag form. The tag form requires a name; every other ALTER WAREHOUSE form (SET <property>, UNSET, SUSPEND, RESUME, RENAME TO, ABORT ALL QUERIES) and the bare name-less form fall through to parse_alter_warehouse unchanged.
  • Statement::SetTags gains an if_exists field, parsed generically in parse_alter_object_set_tags. As a side effect ALTER DATABASE|SCHEMA IF EXISTS ... SET TAG now parse.
  • CREATE [OR REPLACE] WAREHOUSE <name> [<properties>] WITH TAG (<t> = '<v>' [, ...]) — new trailing-only with_tags field on Statement::CreateWarehouse. Properties after the tag clause are a syntax error, matching Snowflake.

🤖 Generated with Claude Code

…T/UNSET TAG, CREATE WAREHOUSE ... WITH TAG

Route ALTER WAREHOUSE <name> { SET | UNSET } TAG through parse_alter_object_set_tags
(mirroring the ALTER SCHEMA maybe_parse form) so the tag form requires a name and
non-tag forms keep falling through to parse_alter_warehouse. Add if_exists to
Statement::SetTags (also enables ALTER DATABASE|SCHEMA IF EXISTS ... SET TAG). Add
a trailing-only WITH TAG (...) clause to CREATE WAREHOUSE via a new with_tags field.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@hovaesco
hovaesco merged commit 138b56a into snowflake/create-stream-append-only Aug 12, 2026
5 of 19 checks passed
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