Skip to content

Snowflake: SHOW [TERSE] STAGES + order-independent CREATE/ALTER STAGE options#10

Merged
wojpadlo merged 3 commits into
lav-487-2-desc-stage-on-bb62bf88from
lav-487-5-show-stages
Jun 9, 2026
Merged

Snowflake: SHOW [TERSE] STAGES + order-independent CREATE/ALTER STAGE options#10
wojpadlo merged 3 commits into
lav-487-2-desc-stage-on-bb62bf88from
lav-487-5-show-stages

Conversation

@wojpadlo

@wojpadlo wojpadlo commented Jun 9, 2026

Copy link
Copy Markdown

Parser support consumed by snowflake-rs task LAV-487-5 (DESCRIBE STAGE + SHOW STAGES).

Changes

  • SHOW [TERSE] STAGES — add Statement::ShowStages { terse, show_options } (mirroring ShowFileFormats), the STAGES keyword, and a parse_show_stages dispatch in the Snowflake SHOW block, plus the Display and spans.rs arms. Previously SHOW STAGES … fell through to the generic SHOW <variable> path, which silently dropped the LIKE pattern and IN SCHEMA scope.
  • Order-independent stage optionsparse_stage_properties matched the property groups (URL / STORAGE_INTEGRATION / ENDPOINT / CREDENTIALS / ENCRYPTION / DIRECTORY / FILE_FORMAT / COPY_OPTIONS / COMMENT) in a fixed sequence, so valid Snowflake such as CREATE 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.rs coverage: test_show_stages, test_show_terse_stages, test_show_stages_like_in_schema, test_create_stage_options_any_order. Full sqlparser_snowflake suite 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.

Wojciech Padlo 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).
@wojpadlo wojpadlo merged commit e9f78d8 into lav-487-2-desc-stage-on-bb62bf88 Jun 9, 2026
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