stevenzwu commented on a change in pull request #4329:
URL: https://github.com/apache/iceberg/pull/4329#discussion_r833902387
##########
File path:
flink/v1.14/flink/src/main/java/org/apache/iceberg/flink/source/ScanContext.java
##########
@@ -114,77 +128,100 @@ private ScanContext(boolean caseSensitive, Long
snapshotId, Long startSnapshotId
this.includeColumnStats = includeColumnStats;
this.exposeLocality = exposeLocality;
this.planParallelism = planParallelism;
+
+ validate();
+ }
+
+ private void validate() {
+ if (isStreaming) {
+ if (startingStrategy ==
StreamingStartingStrategy.SPECIFIC_START_SNAPSHOT_ID) {
+ Preconditions.checkArgument(startSnapshotId != null,
+ "startSnapshotId cannot be null for SPECIFIC_START_SNAPSHOT_ID
starting strategy");
+ }
+ if (startingStrategy ==
StreamingStartingStrategy.SPECIFIC_START_SNAPSHOT_TIMESTAMP) {
+ Preconditions.checkArgument(startSnapshotTimestamp != null,
+ "startSnapshotTimestamp cannot be null for
SPECIFIC_START_SNAPSHOT_TIMESTAMP starting strategy");
Review comment:
sure. will add them
--
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]