You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Databricks: Add support for UPDATE SET * and INSERT * in MERGE statements
Add parsing support for the Databricks star shorthand syntax in MERGE
statements, allowing `UPDATE SET *` and `INSERT *` to reference all columns
from the source.
- Add `MergeUpdateKind` enum (`Set(Vec<Assignment>)` | `Star`) to replace
the previous `assignments` field on `MergeUpdateExpr`, enforcing valid
states at the type level
- Add `MergeInsertKind::Star` variant for `INSERT *` shorthand
- Add `supports_merge_star_syntax()` dialect method for Databricks and Generic
let sql = "MERGE INTO target USING source ON target.id = source.id WHEN NOT MATCHED BY TARGET THEN INSERT *";
779
+
databricks_and_generic().verified_stmt(sql);
780
+
}
781
+
782
+
#[test]
783
+
fntest_merge_mixed_star_and_explicit(){
784
+
let sql = "MERGE INTO target USING source ON target.id = source.id WHEN MATCHED THEN UPDATE SET * WHEN NOT MATCHED THEN INSERT (a, b) VALUES (source.a, source.b)";
0 commit comments