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


##########
core/src/main/java/org/apache/iceberg/BaseIncrementalScan.java:
##########
@@ -35,6 +35,19 @@ protected BaseIncrementalScan(
   protected abstract CloseableIterable<T> doPlanFiles(
       Long fromSnapshotIdExclusive, long toSnapshotIdInclusive);
 
+  @Override
+  public ThisT fromSnapshotInclusive(long fromSnapshotId, String branch) {
+    Preconditions.checkArgument(
+        table().snapshot(fromSnapshotId) != null,
+        "Cannot find the starting snapshot: %s",
+        fromSnapshotId);
+    Preconditions.checkArgument(
+        table().snapshot(branch) != null, "Cannot find the branch: %s", 
branch);
+    TableScanContext newContext =

Review Comment:
   Done.



##########
api/src/main/java/org/apache/iceberg/IncrementalScan.java:
##########
@@ -33,6 +49,21 @@
    */
   ThisT fromSnapshotInclusive(long fromSnapshotId);
 
+  /**
+   * Instructs this scan to look for changes starting from a particular 
snapshot (exclusive).
+   *
+   * <p>If the start snapshot is not configured, it is defaulted to the oldest 
ancestor of the end
+   * snapshot (inclusive).
+   *
+   * @param fromSnapshotId the start snapshot ID (exclusive)
+   * @param branch the ref used
+   * @return this for method chaining
+   * @throws IllegalArgumentException if the start snapshot is not an ancestor 
of the end snapshot
+   */
+  default ThisT fromSnapshotExclusive(long fromSnapshotId, String branch) {

Review Comment:
   Done



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

Reply via email to