Uh oh!
There was an error while loading. Please reload this page.
Databricks: support INSERT BY NAME - #2403
Conversation
Uh oh!
There was an error while loading. Please reload this page.
| by_name = columns.is_empty() | ||
| && self.dialect.supports_insert_by_name() |
There was a problem hiding this comment.
| by_name = columns.is_empty() | |
| &&self.dialect.supports_insert_by_name() | |
| by_name = by_name.is_none() | |
| &&self.dialect.supports_insert_by_name() |
I think we can drop the columns check? its not clear why it would be needed at this layer, if the implication is something semantic then that can be left up to the consumer to validate. Relatedly, I assume we need to only set the name if we don't already have one (can we cover that scenario in the tests)?
finchxxia
commented
Aug 3, 2026
Hi @iffyio , I have committed some changes as per your suggestions. Could you plz take a look again? |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Ifeanyi Ubah <ify1992@yahoo.com>
Cover BY NAME alongside a PARTITION clause and a table alias to guard against conflicts with neighbouring INSERT syntax, and rely on verified_stmt in the Databricks tests since the AST is asserted in the common tests. Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
This PR adds support for Databricks INSERT ... BY NAME syntax.
Examples
Testing
cargo test --test sqlparser_databricks test_databricks_insert_by_name
Relevant PostgreSQL INSERT regression tests