Snowflake: warehouse tagging grammar (ALTER WAREHOUSE SET/UNSET TAG, CREATE WAREHOUSE ... WITH TAG) - #21
Merged
hovaesco merged 1 commit intoAug 12, 2026
Conversation
…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
merged commit Aug 12, 2026
138b56a
into
snowflake/create-stream-append-only
5 of 19 checks passed
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.
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 throughparse_alter_object_set_tagsvia amaybe_parsemirror of theALTER SCHEMAtag form. The tag form requires a name; every otherALTER WAREHOUSEform (SET<property>, UNSET, SUSPEND, RESUME, RENAME TO, ABORT ALL QUERIES) and the bare name-less form fall through toparse_alter_warehouseunchanged.Statement::SetTagsgains anif_existsfield, parsed generically inparse_alter_object_set_tags. As a side effectALTER DATABASE|SCHEMA IF EXISTS ... SET TAGnow parse.CREATE [OR REPLACE] WAREHOUSE <name> [<properties>] WITH TAG (<t> = '<v>' [, ...])— new trailing-onlywith_tagsfield onStatement::CreateWarehouse. Properties after the tag clause are a syntax error, matching Snowflake.🤖 Generated with Claude Code