Snowflake: SHOW [TERSE] STAGES + order-independent CREATE/ALTER STAGE options#10
Merged
Merged
Conversation
added 3 commits
June 9, 2026 13:12
Add Statement::ShowStages { terse, show_options } mirroring
ShowFileFormats, plus the STAGES keyword and parse_show_stages dispatch
in the Snowflake SHOW block.
parse_stage_properties matched the property groups in a fixed sequence, rejecting valid Snowflake like FILE_FORMAT=(...) URL='...'. Match the groups in a loop instead so they may appear in any order (each once).
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.
Parser support consumed by snowflake-rs task LAV-487-5 (DESCRIBE STAGE + SHOW STAGES).
Changes
SHOW [TERSE] STAGES— addStatement::ShowStages { terse, show_options }(mirroringShowFileFormats), theSTAGESkeyword, and aparse_show_stagesdispatch in the SnowflakeSHOWblock, plus theDisplayandspans.rsarms. PreviouslySHOW STAGES …fell through to the genericSHOW <variable>path, which silently dropped theLIKEpattern andIN SCHEMAscope.parse_stage_propertiesmatched the property groups (URL/STORAGE_INTEGRATION/ENDPOINT/CREDENTIALS/ENCRYPTION/DIRECTORY/FILE_FORMAT/COPY_OPTIONS/COMMENT) in a fixed sequence, so valid Snowflake such asCREATE STAGE s FILE_FORMAT = (TYPE=CSV) URL = 's3://test/'(FILE_FORMAT before URL) failed to parse. Reworked to match the groups in a loop so they can appear in any order (each at most once).Tests
Added
tests/sqlparser_snowflake.rscoverage:test_show_stages,test_show_terse_stages,test_show_stages_like_in_schema,test_create_stage_options_any_order. Fullsqlparser_snowflakesuite passes (308 tests).Note: stacked on the LAV-487-2 branch (
lav-487-2-desc-stage-on-bb62bf88); the 2 commits here are the only diff.