aokolnychyi commented on a change in pull request #4370:
URL: https://github.com/apache/iceberg/pull/4370#discussion_r831619648
##########
File path:
core/src/test/java/org/apache/iceberg/TestOverwriteWithValidation.java
##########
@@ -995,4 +997,35 @@ public void testOverwriteCaseSensitivity() {
.validateNoConflictingData()
.commit());
}
+
+ @Test
+ public void testMetadataOnlyDeleteWithPositionDeletes() {
+ Assume.assumeTrue(formatVersion == 2);
+
+ Assert.assertNull("Should be empty table", table.currentSnapshot());
+
+ table.newAppend()
+ .appendFile(FILE_DAY_2)
+ .appendFile(FILE_DAY_2_ANOTHER_RANGE)
+ .commit();
+
+ table.newRowDelta()
+ .addDeletes(FILE_DAY_2_POS_DELETES)
+ .addDeletes(FILE_DAY_2_ANOTHER_RANGE_EQ_DELETES)
+ .commit();
+
+ Snapshot baseSnapshot = table.currentSnapshot();
+
+ table.newOverwrite()
+ .overwriteByRowFilter(EXPRESSION_DAY_2_ANOTHER_ID_RANGE)
+ .addFile(FILE_DAY_2_MODIFIED)
+ .validateFromSnapshot(baseSnapshot.snapshotId())
+ .conflictDetectionFilter(EXPRESSION_DAY_2_ANOTHER_ID_RANGE)
+ .validateNoConflictingData()
+ .validateNoConflictingDeletes()
+ .commit();
+
+ validateTableFiles(table, FILE_DAY_2, FILE_DAY_2_MODIFIED);
+ validateTableDeleteFiles(table, FILE_DAY_2_POS_DELETES);
Review comment:
This would previously fail as we should remove one delete file and one
should be kept.
--
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]