fmorillo7694 commented on code in PR #18993:
URL: https://github.com/apache/iceberg/pull/18993#discussion_r4600784970
##########
core/src/main/java/org/apache/iceberg/MergingSnapshotProducer.java:
##########
@@ -303,13 +303,24 @@ private static void
validateDeleteFileForVersion(DeleteFile file, int formatVers
ContentFileUtil.dvDesc(file));
break;
case 3:
- case 4:
Preconditions.checkArgument(
file.content() == FileContent.EQUALITY_DELETES ||
ContentFileUtil.isDV(file),
"Must use DVs for position deletes in V%s: %s",
formatVersion,
file.location());
break;
+ case 4:
+ Preconditions.checkArgument(
Review Comment:
Thanks @JeonDaehong, good catch. Added `TestRewriteFiles` cases in 0609498:
on a v3 table upgraded to v4, rewriting an equality delete into a new equality
delete fails with "Cannot add equality deletes in V4", while replacing it with
a DV or removing it outright still succeeds, so compaction can clear legacy
equality deletes.
(Drafted with help from Claude (Anthropic), partially reviewed.)
--
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]