dilipbiswal opened a new pull request #2021:
URL: https://github.com/apache/iceberg/pull/2021


   SQL standard requires an exception to be thrown if the ON clause in MERGE is 
such that more than 1 row in source matches a row in target
   
   Implements suggestion 1 from Anton in 
[comment](https://github.com/apache/iceberg/pull/1947#issuecomment-747450897)
   
   ```
   
   1. append _row_id and _file columns to the target table
   2. do an inner join on the merge condition
   3. define a udf that accepts the file name, adds it to the accumulator and 
retuns 1
   4. group by _row_id, perform the cardinality check
   5. access the accumulator to get the matching files
   
   ```


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

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