rdblue commented on code in PR #13555: URL: https://github.com/apache/iceberg/pull/13555#discussion_r2223170737
########## spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteDataFilesAction.java: ########## @@ -1968,6 +2007,68 @@ public void testZOrderRewriteWithSpecificOutputSpecId() { shouldRewriteDataFilesWithPartitionSpec(table, outputSpecId); } + @TestTemplate + public void testUnpartitionedRewriteDataFilesPreservesLineage() throws NoSuchTableException { + assumeThat(formatVersion).isGreaterThan(2); + + // Verify the initial row IDs and sequence numbers + Table table = createTable(4); + shouldHaveFiles(table, 4); + List<Object[]> expectedRecordsWithLineage = currentDataWithLineage(); + List<Object[]> expectedRecords = currentDataWithLineage(); + List<Long> rowIds = + expectedRecords.stream().map(record -> (Long) record[0]).collect(Collectors.toList()); + List<Long> lastUpdatedSequenceNumbers = + expectedRecords.stream().map(record -> (Long) record[1]).collect(Collectors.toList()); Review Comment: This is odd. Both `expectedRecords` and `expectedRecordsWithLineage` come from the same source, `currentDataWithLineage` but the lineage here is derived from the variable without the `WithLineage` suffix. -- 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