Snowflake: parse ALTER STAGE (SET / RENAME TO)#9
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
These checks were already red on the base branch (lav-379-2-for-over-cursor), inherited from the cursor/scripting/ACCOUNT commits — unrelated to ALTER STAGE, but required for green CI on this PR: - codestyle: run cargo fmt --all across the crate - lint: collapse a match-in-match (parser scripting list), replace a forbidden unreachable! in DESCRIBE object-type parsing with a parse error, and collapse nested match arms in the warehouse/account tests - docs: drop unresolved intra-doc link brackets in scripting-list doc comments - compile-no-std: gate 'use alloc::vec' behind not(feature = std) in spans.rs Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Summary
Adds
ALTER STAGEparsing to the Snowflake dialect:SETcaptures the same property groups asCREATE STAGE(URL, STORAGE_INTEGRATION,CREDENTIALS, ENCRYPTION, FILE_FORMAT, COPY_OPTIONS, DIRECTORY, COMMENT), reusing the
existing
StageParamsObject/KeyValueOptionsshapes rather than new bespoke structs.Changes
Statement::AlterStage { name, if_exists, operation }variant andAlterStageOperation { RenameTo(ObjectName), Set { .. } }enum, withDisplayand
spans.rscoverage.ALTER STAGEdispatch +parse_alter_stagein the Snowflake dialect.CREATE STAGEproperty-group parsing into a privateStageProperties/parse_stage_propertieshelper, reused by bothCREATE STAGEandALTER STAGE ... SET(no duplication).Display) tests for the new forms intests/sqlparser_snowflake.rs.Consumed downstream by snowflake-rs LAV-487-4 (rewriter + UDF wiring).
🤖 Generated with Claude Code