Aggarwal-Raghav opened a new pull request, #6701: URL: https://github.com/apache/hive/pull/6701
### What changes were proposed in this pull request? When `write.delete.mode=copy-on-write` and `write.merge.mode=merge-on-read` (default), running a `MERGE INTO ... WHEN MATCHED THEN DELETE` query incorrectly causes the writer to use COW instead of MOR causing duplicate rows instead of deleting the rows. Added an `isMergeStatement` boolean flag to `FileSinkDesc` and propagated it to the Hadoop JobConf during `FileSinkOperator` initialization via `HiveCustomStorageHandlerUtils.setIsMergeStatement` ### Why are the changes needed? Check [HIVE-29816](https://issues.apache.org/jira/browse/HIVE-29816) ### Does this PR introduce _any_ user-facing change? Yes, executing `MERGE INTO... DELETE` query on tables utilizing `Copy-On-Write` delete modes will no longer experience data duplication and sequence number increments. ### How was this patch tested? Using, q files and on spark -- 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]
