hililiwei commented on code in PR #5984:
URL: https://github.com/apache/iceberg/pull/5984#discussion_r1000087236


##########
core/src/test/java/org/apache/iceberg/TestBaseIncrementalAppendScan.java:
##########
@@ -67,6 +116,51 @@ public void testFromSnapshotExclusive() {
     Assert.assertEquals(1, Iterables.size(scanWithToSnapshot.planFiles()));
   }
 
+  @Test
+  public void testFromSnapshotExclusiveWithBranch() {
+    table.newFastAppend().appendFile(FILE_A).commit();
+    long snapshotAId = table.currentSnapshot().snapshotId();
+
+    String branchName = "b1";
+    table.manageSnapshots().createBranch(branchName, snapshotAId).commit();
+
+    table.newFastAppend().appendFile(FILE_B).commit();
+    long snapshotBId = table.currentSnapshot().snapshotId();
+    String branchName2 = "b2";
+    table.manageSnapshots().createBranch(branchName2, snapshotBId).commit();
+
+    table.newFastAppend().appendFile(FILE_C).toBranch(branchName).commit();
+    long snapshotCId = table.snapshot(branchName).snapshotId();
+
+    IncrementalAppendScan scan = newScan().fromSnapshotExclusive(snapshotAId, 
branchName);
+    Assert.assertEquals(1, Iterables.size(scan.planFiles()));
+
+    IncrementalAppendScan scanWithToSnapshot =
+        newScan().fromSnapshotExclusive(snapshotAId, 
branchName).toSnapshot(snapshotBId);
+    Assert.assertEquals(1, Iterables.size(scanWithToSnapshot.planFiles()));
+
+    AssertHelpers.assertThrows(

Review Comment:
   I added a method in `AssertHelpers` that without `message`.
   
   



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