nastra commented on code in PR #9849:
URL: https://github.com/apache/iceberg/pull/9849#discussion_r1511205551


##########
core/src/test/java/org/apache/iceberg/TestIncrementalDataTableScan.java:
##########
@@ -196,56 +193,66 @@ public void testRollbacks() {
     transaction.commitTransaction();
     // Go back to snapshot "E"
     table.manageSnapshots().rollbackTo(5).commit();
-    Assert.assertEquals(5, table.currentSnapshot().snapshotId());
+    assertThat(table.currentSnapshot().snapshotId()).isEqualTo(5);
     filesMatch(Lists.newArrayList("B", "D", "E"), appendsBetweenScan(1, 5));
     filesMatch(Lists.newArrayList("B", "D", "E"), appendsAfterScan(1));
   }
 
-  @Test
+  @TestTemplate
   public void testIgnoreResiduals() throws IOException {
     add(table.newAppend(), files("A"));
     add(table.newAppend(), files("B"));
     add(table.newAppend(), files("C"));
 
-    TableScan scan1 = table.newScan().filter(Expressions.equal("id", 
5)).appendsBetween(1, 3);
+    IncrementalAppendScan scan1 =
+        table
+            .newIncrementalAppendScan()
+            .filter(Expressions.equal("id", 5))
+            .fromSnapshotExclusive(1)
+            .toSnapshot(3);
 
     try (CloseableIterable<CombinedScanTask> tasks = scan1.planTasks()) {
-      Assert.assertTrue(
-          "Tasks should not be empty", 
com.google.common.collect.Iterables.size(tasks) > 0);
+      assertThat(tasks).as("Tasks should not be empty").hasSizeGreaterThan(0);
       for (CombinedScanTask combinedScanTask : tasks) {
         for (FileScanTask fileScanTask : combinedScanTask.files()) {
-          Assert.assertNotEquals(
-              "Residuals must be preserved", Expressions.alwaysTrue(), 
fileScanTask.residual());
+          assertThat(fileScanTask.residual())
+              .as("Residuals must be preserved")
+              .isNotEqualTo(Expressions.alwaysTrue());
         }
       }
     }
 
-    TableScan scan2 =
-        table.newScan().filter(Expressions.equal("id", 5)).appendsBetween(1, 
3).ignoreResiduals();
+    IncrementalAppendScan scan2 =
+        table
+            .newIncrementalAppendScan()

Review Comment:
   why has this changed?



-- 
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

Reply via email to