HIVE-29815: Iceberg: [V3] Support ROW LINEAGE in Copy-On-Write DELETE operations - #6698
HIVE-29815: Iceberg: [V3] Support ROW LINEAGE in Copy-On-Write DELETE operations#6698Aggarwal-Raghav wants to merge 2 commits into
Conversation
ayushtkn
left a comment
There was a problem hiding this comment.
thanx @Aggarwal-Raghav for the fix, minor request around the test.
- @kokila-19 can u review as well
| ) | ||
| STORED BY iceberg | ||
| TBLPROPERTIES ('format-version'='3', 'write.delete.mode'='copy-on-write'); |
There was a problem hiding this comment.
can u add a test around a partitioned table as well
ayushtkn
left a comment
There was a problem hiding this comment.
If the build comes clean, changes LGTM
|
Good Catch @Aggarwal-Raghav |
|
|
I've found 1 more potential bug/scope of improvement. Please hold on merging it. |
|
The new issue i found was for row lineage for MERGE WHEN DELETE query. MERGE INTO ice_cow_merge_delete_only t
USING merge_source s
ON t.id = s.id
WHEN MATCHED THEN DELETE;The following code doesn't check for merge when delete. it only checks for hive/ql/src/java/org/apache/hadoop/hive/ql/metadata/RowLineageUtils.java Lines 109 to 114 in b88f948 |
|
@ayushtkn |
|
Filed HIVE-29816. You can proceed with this PR merge as per your convenience |







What changes were proposed in this pull request?
Check HIVE-29815
This PR updates
CopyOnWriteDeleteRewriter.javato explicitly select and preserveROW__LINEAGE__IDandLAST__UPDATED__SEQUENCE__NUMBERwhen rewriting files during a Copy-On-Write DELETE operation on Iceberg V3 tables.Why are the changes needed?
Currently, when a user deletes a row in COW mode, the surviving rows are rewritten into a new file without their original lineage metadata. As a result, they get assigned brand new lineage IDs and sequence numbers
Does this PR introduce any user-facing change?
Yes
How was this patch tested?
With q file and on spark engine as well