MERGE should raise when multiple source rows match target row #2407
Labels
binding/python
Issues for the Python package
binding/rust
Issues for the Rust crate
bug
Something isn't working
good first issue
Good for newcomers
help wanted
Extra attention is needed
Environment
Delta-rs version: 0.16.4
Binding: Python 0.16.4
Environment:
Bug
What happened:
TableMerger.when_matched_update_all() inserts records when there is a match on multiple source columns
TableMerger.when_matched_update() inserts records when there is a match on multiple source columns
What you expected to happen:
TableMerger.when_matched_update_all() should throw an error if a target record matches multiple source records
TableMerger.when_matched_update() should throw an error if a target record matches multiple source records
They should never insert new records.
How to reproduce it:
Using polars 0.20.7
Gives the following output
base table
After TableMerger is executed
More details:
Info on the specific case in slack: https://delta-users.slack.com/archives/C013LCAEB98/p1712673309723829
The text was updated successfully, but these errors were encountered: