sabir-akhadov-localstack opened a new pull request, #2475:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2475

   Snowflake's `CREATE EXTERNAL VOLUME` and `DROP EXTERNAL VOLUME` did not 
parse. Example that failed before:
   
   ```sql
   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](https://docs.snowflake.com/en/sql-reference/sql/create-external-volume).
   
   Replaces #2397, split into four PRs per review feedback — this one plus 
ALTER (#2474), DESC (#2472) and SHOW (#2473).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to