Skip to content

Snowflake: Add CREATE and DROP EXTERNAL VOLUME - #2475

Open
sabir-akhadov-localstack wants to merge 2 commits into
apache:mainfrom
localstack:pr/05-external-volume
Open

sabir-akhadov-localstack wants to merge 2 commits into
apache:mainfrom
localstack:pr/05-external-volume

Conversation

@sabir-akhadov-localstack

Copy link
Copy Markdown
Contributor

Snowflake's CREATE EXTERNAL VOLUME and DROP EXTERNAL VOLUME did not parse. Example that failed before:

CREATE EXTERNAL VOLUME my_vol STORAGE_LOCATIONS = (
    (NAME = 'loc1' STORAGE_PROVIDER = 'S3' STORAGE_BASE_URL = 's3://bucket/path/'));

This adds CREATE [OR REPLACE] EXTERNAL VOLUME [IF NOT EXISTS] and DROP EXTERNAL VOLUME (mirroring the merged CREATE/DROP WAREHOUSE, #2388). Each storage location is a parenthesized key-value option list parsed generically into the existing KeyValueOptions, so fields (including the nested ENCRYPTION = (...) list) may appear in any order, matching real Snowflake. Only an empty location is rejected; semantic checks such as the required STORAGE_BASE_URL or duplicate fields are left to the consumer, in line with the parser's permissive stance. The trailing ALLOW_WRITES and COMMENT properties are accepted in either order. DROP EXTERNAL VOLUME reuses the generic Statement::Drop via a new ObjectType::ExternalVolume. All statements round-trip.

See the Snowflake CREATE EXTERNAL VOLUME docs.

Replaces #2397, split into four PRs per review feedback — this one plus ALTER (#2474), DESC (#2472) and SHOW (#2473).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@sabir-akhadov-localstack

Copy link
Copy Markdown
Contributor Author

Rebased on latest main. @iffyio @LucaCappelletti94 could you take a look when you have a moment? This is the first of the PRs split out of #2397 (#2472 and #2473 are the others; #2474 is stacked on this one).

@codecov-commenter

codecov-commenter commented Oct 15, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.78082% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.23%. Comparing base (5d653a2) to head (fb55c05).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
src/ast/mod.rs 77.77% 1 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2475      +/-   ##
==========================================
+ Coverage   81.16%   81.23%   +0.07%     
==========================================
  Files          42       42              
  Lines       33769    33944     +175     
  Branches    33769    33944     +175     
==========================================
+ Hits        27408    27575     +167     
+ Misses       2797     2791       -6     
- Partials     3564     3578      +14     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs rebasing The PR has collisions with main and requires rebasing Snowflake

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants