nastra commented on code in PR #9860: URL: https://github.com/apache/iceberg/pull/9860#discussion_r1519789244
########## core/src/test/java/org/apache/iceberg/TestOverwrite.java: ########## @@ -271,6 +280,36 @@ public void testValidatedOverwriteWithAppendOutsideOfDelete() { "Should not create a new snapshot", baseId, latestSnapshot(table, branch).snapshotId()); } + @Test + public void testValidatedOverwriteWithAppendSuccess() { + // ensure the overwrite results in a merge + table.updateProperties().set(TableProperties.MANIFEST_MIN_MERGE_COUNT, "1").commit(); + + TableMetadata base = TestTables.readMetadata(TABLE_NAME); + long baseId = latestSnapshot(base, branch).snapshotId(); + + OverwriteFiles overwrite = + table + .newOverwrite() + .overwriteByRowFilter(equal("date", "2018-06-09")) + .addFile(FILE_10_TO_14) // in 2018-06-09 + .validateAddedFilesMatchOverwriteFilter(); + commit(table, overwrite, branch); + + long overwriteId = latestSnapshot(table, branch).snapshotId(); + + assertThat(overwriteId).as("Should create a new snapshot").isNotEqualTo(baseId); + assertThat(latestSnapshot(table, branch).allManifests(table.io()).size()) Review Comment: ```suggestion assertThat(latestSnapshot(table, branch).allManifests(table.io())).hasSize(1) ``` -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org