97nitt opened a new pull request, #2327: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2327
## Summary Snowflake's [`CREATE VIEW` syntax][docs] documents `COPY GRANTS` as appearing *after* the column list: ```sql CREATE OR REPLACE VIEW v (a, b) COPY GRANTS AS SELECT a, b FROM t; ``` The parser already accepted `COPY GRANTS` *before* the column list, but rejected the documented post-columns position. This PR accepts either position (but not both). [docs]: https://docs.snowflake.com/en/sql-reference/sql/create-view#syntax ## Changes - `parse_create_view`: after consuming the column list, attempt a second `COPY GRANTS` match if one wasn't already seen. - `Display` continues to emit the pre-columns form, so the post-columns input round-trips to the existing canonical shape. - Tests: cover `VIEW`, `SECURE VIEW`, and `MATERIALIZED VIEW` with post-columns `COPY GRANTS`, and a baseline asserting the flag is not spuriously set when `COPY GRANTS` is absent. ## Test plan - [x] `cargo test` - [x] `cargo fmt --check` - [x] `cargo clippy --all-targets --all-features -- -D warnings` -- 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]
