rdblue commented on code in PR #16263:
URL: https://github.com/apache/iceberg/pull/16263#discussion_r3221851327
##########
core/src/test/java/org/apache/iceberg/TestRowLineageAssignment.java:
##########
@@ -781,6 +781,22 @@ public void
testUpgradeAssignmentWithManifestCompaction(@TempDir File altLocatio
FILE_C.recordCount() + FILE_B.recordCount());
}
+ @Test
+ public void testRewritePreservesExistingFileFirstRowIds() {
+ table.newAppend().appendFile(FILE_A).appendFile(FILE_B).commit();
+ // FILE_A→0, FILE_B→125; nextRowId=225
+ table.updateProperties().set(TableProperties.MANIFEST_MIN_MERGE_COUNT,
"1").commit();
+ table.newRewrite().deleteFile(FILE_A).addFile(FILE_C).commit();
Review Comment:
I find it a little misleading that `FILE_A` is removed in order to change
the status of `FILE_B` to `EXISTING` in the same commit that adds `FILE_C`. I
think it would be better to separate those two operations so that we can
isolate and test the result of changing `FILE_B`. We can show that it is
assigned a specific `first_row_id` from the previous read. Then after adding
`FILE_C` and compacting the metadata we can assert that the same ID is still
present.
--
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]