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