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

   ### Summary
   This PR adds support for Databricks INSERT ... BY NAME syntax.
   - Adds a by_name field to the Insert AST node.
   - Parses BY NAME for the Databricks and Generic dialects.
   - Preserves BY NAME when formatting the AST back to SQL.
   - Adds test coverage for INSERT INTO ... BY NAME with both SELECT and WITH 
queries.
   - Updates existing Insert AST construction sites with the default by_name: 
false.
   
   ### Examples
   ```
   INSERT INTO target BY NAME
   SELECT 1 AS a;
   ```
   ```
   INSERT INTO TABLE target BY NAME
   WITH source AS (
       SELECT 1 AS event_data_id
   )
   SELECT event_data_id FROM source;
   ```
   
   ### Testing
   cargo test --test sqlparser_databricks test_databricks_insert_by_name
   Relevant PostgreSQL INSERT regression tests


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