anoopj commented on code in PR #15671:
URL: https://github.com/apache/iceberg/pull/15671#discussion_r2975614202
##########
core/src/test/java/org/apache/iceberg/TestRewriteFiles.java:
##########
@@ -778,6 +778,59 @@ public void testNewDeleteFile() {
branch);
}
+ @TestTemplate
+ public void danglingDVDetectionSkipsNonOverlappingPartitions() {
+ assumeThat(formatVersion).isGreaterThanOrEqualTo(3);
+
+ // Commit data files + DVs to two separate partitions in separate commits
+ // so they end up in separate delete manifests
+ commit(table,
table.newRowDelta().addRows(FILE_A).addDeletes(fileADeletes()), branch);
+ Snapshot snap1 = latestSnapshot(table, branch);
+
+ commit(table,
table.newRowDelta().addRows(FILE_B).addDeletes(fileBDeletes()), branch);
+ Snapshot snap2 = latestSnapshot(table, branch);
+
+ // Verify we have 2 separate delete manifests (one per partition)
+ assertThat(snap2.deleteManifests(table.io())).hasSize(2);
+ ManifestFile deleteManifestForB = snap2.deleteManifests(table.io()).get(0);
Review Comment:
Minor: the test is assuming get(0) returns file_B's manifest etc. The
Iceberg spec says nothing about temporal ordering of manifests within a
snapshot's manifest list. But the current Java implementation behaves this way.
--
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]