XComp commented on code in PR #21971:
URL: https://github.com/apache/flink/pull/21971#discussion_r1118919072


##########
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/source/datagen/SequenceGenerator.java:
##########
@@ -83,9 +86,11 @@ public void open(
             final int taskIdx = runtimeContext.getIndexOfThisSubtask();
             final long congruence = start + taskIdx;
 
+            Preconditions.checkArgument(
+                    end - start < Long.MAX_VALUE - 1, "Limit exceeded 
Long.MAX_VALUE-1");

Review Comment:
   ```suggestion
                       end - start < Long.MAX_VALUE - 1, "Limit exceeded " + 
Long.MAX_VALUE - 1);
   ```
   Don't we want to print the actual value here? I'm a bit torn here because I 
see the problem with just printing a really big number. Going for 
`Long.MAX_VALUE` might actually more readabile. WDYT?



-- 
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...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to