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

   ## Summary
   - Add `Dialect::supports_cte_without_as()` to support dialects where the 
`AS` keyword is optional in CTE definitions
   - Enable for Databricks and Generic dialects
   - Disambiguate `name (query)` from `name (columns)` by peeking at the token 
after `(`
   
   Databricks [allows 
omitting](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-qry-select-cte)
 the `AS` keyword:
   ```sql
   WITH cte (SELECT 1) SELECT * FROM cte
   ```
   
   ## Test plan
   - [x] Positive tests: CTE without AS, mixed CTEs, column defs without AS
   - [x] Negative test: non-supporting dialects reject the syntax
   - [x] Existing CTE tests unaffected
   - [x] `cargo fmt`, `cargo clippy`, full test suite pass


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