osipovartem opened a new pull request, #2518:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2518

   ## Which issue does this PR close?
   
   Closes no issue.
   
   ## Rationale for this change
   
   Snowflake permits nested semi-structured paths in staged COPY 
transformations, for example `$1:country:name::VARCHAR`. The dedicated simple 
staged-field parser currently consumes `$1:country` and leaves `:name::VARCHAR` 
behind, so the documented statement fails to parse.
   
   Documentation: 
https://docs.snowflake.com/en/user-guide/tutorials/script-data-load-transform-parquet
   
   ## What changes are included in this PR?
   
   - Fall back to the standard expression parser when a staged field is 
followed by another path operator, bracket access, qualification, or cast.
   - Extend the existing COPY cast-transformation test with the documented 
nested-path shape.
   
   Simple staged fields keep their compact `StageLoadSelectItem` AST; only 
complex expressions use the existing `JsonAccess` / `Cast` AST.
   
   ## Are there any user-facing changes?
   
   Yes. Snowflake COPY statements with nested staged paths now parse and 
round-trip correctly.
   
   ## How was this change tested?
   
   - `cargo test --test sqlparser_snowflake` (164 passed)
   - `cargo clippy --all-targets --all-features -- -D warnings`
   - `cargo fmt --all -- --check`


-- 
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