RussellSpitzer commented on code in PR #7636:
URL: https://github.com/apache/iceberg/pull/7636#discussion_r1204423020
##########
spark/v3.3/spark/src/test/java/org/apache/iceberg/spark/source/TestDataSourceOptions.java:
##########
@@ -288,29 +289,37 @@ public void testIncrementalScanOptions() throws
IOException {
});
// test (1st snapshot, current snapshot] incremental scan.
- List<SimpleRecord> result =
+ Dataset<Row> resultDf1 =
spark
.read()
.format("iceberg")
.option("start-snapshot-id", snapshotIds.get(3).toString())
- .load(tableLocation)
- .orderBy("id")
- .as(Encoders.bean(SimpleRecord.class))
- .collectAsList();
- Assert.assertEquals("Records should match", expectedRecords.subList(1, 4),
result);
+ .load(tableLocation);
+ List<SimpleRecord> result1 =
+
resultDf1.orderBy("id").as(Encoders.bean(SimpleRecord.class)).collectAsList();
+ Assert.assertEquals("Records should match", expectedRecords.subList(1, 4),
result1);
+ Assert.assertEquals("Unprocessed count should match record count", 3,
resultDf1.count());
+
+ Row row1 = resultDf1.agg(functions.min("id"), functions.max("id")).head();
+ Assert.assertEquals("min value should match", 2, row1.getInt(0));
+ Assert.assertEquals("max value should match", 4, row1.getInt(1));
// test (2nd snapshot, 3rd snapshot] incremental scan.
- Dataset<Row> resultDf =
+ Dataset<Row> resultDf2 =
Review Comment:
resultDf2 => incrementalResult
--
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]