rdblue commented on code in PR #10962: URL: https://github.com/apache/iceberg/pull/10962#discussion_r1859256224
########## core/src/test/java/org/apache/iceberg/TestRewriteFiles.java: ########## @@ -384,6 +386,116 @@ public void testRewriteDataAndAssignOldSequenceNumber() { assertThat(listManifestFiles()).hasSize(4); } + @TestTemplate + public void testRewriteDataAndAssignOldSequenceNumbersShouldNotDropDeleteFiles() { + assumeThat(formatVersion) + .as("Sequence number is only supported in iceberg format v2 or later") + .isGreaterThan(1); + assertThat(listManifestFiles()).isEmpty(); + + commit(table, table.newRowDelta().addRows(FILE_A).addDeletes(FILE_A2_DELETES), branch); + + long firstRewriteSequenceNumber = latestSnapshot(table, branch).sequenceNumber(); + + commit( + table, + table.newRowDelta().addRows(FILE_B).addRows(FILE_B).addDeletes(FILE_B2_DELETES), + branch); + commit( + table, + table.newRowDelta().addRows(FILE_B).addRows(FILE_C).addDeletes(FILE_C2_DELETES), Review Comment: Why are there additional copies of `FILE_B` in this commit and the one before it? Won't those be removed in the rewrite? -- 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