Uh oh!
There was an error while loading. Please reload this page.
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
Aggarwal-Raghav
commented
Aug 13, 2026
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
kokila-19
commented
Aug 14, 2026
Good Catch @Aggarwal-Raghav |
Aggarwal-Raghav
commented
Aug 14, 2026
I've found 1 more potential bug/scope of improvement. Please hold on merging it. |
Aggarwal-Raghav
commented
Aug 14, 2026
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
ONt.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 |
Aggarwal-Raghav
commented
Aug 14, 2026
@ayushtkn |
Aggarwal-Raghav
commented
Aug 14, 2026
Filed HIVE-29816. You can proceed with this PR merge as per your convenience |
Aggarwal-Raghav
commented
Aug 24, 2026
@ayushtkn , can you merge this? |







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