pvary commented on code in PR #10207:
URL: https://github.com/apache/iceberg/pull/10207#discussion_r1577703711


##########
flink/v1.19/flink/src/main/java/org/apache/iceberg/flink/source/ScanContext.java:
##########
@@ -155,6 +155,13 @@ private void validate() {
       Preconditions.checkArgument(
           tag == null,
           String.format("Cannot scan table using ref %s configured for 
streaming reader", tag));
+      Preconditions.checkArgument(
+          snapshotId == null, "Cannot set snapshot-id option for streaming 
reader");
+      Preconditions.checkArgument(
+          asOfTimestamp == null, "Cannot set as-of-timestamp option for 
streaming reader");
+      Preconditions.checkArgument(

Review Comment:
   Here is the code:
   ```
         Snapshot toSnapshotInclusive =
             toSnapshotInclusive(
                 lastConsumedSnapshotId, currentSnapshot, 
scanContext.maxPlanningSnapshotCount());
         IcebergEnumeratorPosition newPosition =
             IcebergEnumeratorPosition.of(
                 toSnapshotInclusive.snapshotId(), 
toSnapshotInclusive.timestampMillis());
         ScanContext incrementalScan =
             scanContext.copyWithAppendsBetween(
                 lastPosition.snapshotId(), toSnapshotInclusive.snapshotId());
   ```
   
   The `toSnapshotInclusive` reads until the current snapshot. Its only role is 
to prevent reading more snapshot than `maxPlanningSnapshotCount`. And we set 
this as a last snapshot for the scan.



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