amogh-jahagirdar commented on code in PR #13555:
URL: https://github.com/apache/iceberg/pull/13555#discussion_r2223645684
##########
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:
Ah I accidentally created a redundant variable, I'll just remove
`expectedRecords`
--
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]