rdblue commented on a change in pull request #4329:
URL: https://github.com/apache/iceberg/pull/4329#discussion_r830173164
##########
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");
Review comment:
We probably want to remove the specific variable names from the error
messages. And we also phrase error messages more directly: `(Problem):
(context)`
This should probably be: `Invalid starting snapshot for
SPECIFIC_START_SNAPSHOT_ID strategy: null`
--
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]