chamikaramj commented on a change in pull request #11607: URL: https://github.com/apache/beam/pull/11607#discussion_r421830922
########## File path: sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/splittabledofn/WatermarkEstimators.java ########## @@ -37,14 +37,16 @@ private Instant lastReportedWatermark; public Manual(Instant watermark) { - this.watermark = checkNotNull(watermark, "watermark must not be null."); - if (watermark.isBefore(GlobalWindow.TIMESTAMP_MIN_VALUE) - || watermark.isAfter(GlobalWindow.TIMESTAMP_MAX_VALUE)) { - throw new IllegalArgumentException( - String.format( - "Provided watermark %s must be within bounds [%s, %s].", - watermark, GlobalWindow.TIMESTAMP_MIN_VALUE, GlobalWindow.TIMESTAMP_MAX_VALUE)); + checkNotNull(watermark, "watermark must not be null."); + + // Making sure that the watermark is within bounds. Review comment: Right, but we are using the constant from the super class here (TIMESTAMP_MAX_VALUE) not END_OF_GLOBAL_WINDOW. https://github.com/apache/beam/blob/25b4ebc65953af34a0cfe83ed80feee0bc6df4ad/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/windowing/GlobalWindow.java#L39 Also, the error we saw was following which points to min value being off, not max value. java.lang.IllegalArgumentException: Provided watermark -290308-12-21T19:59:05.224Z must be within bounds [-290308-12-21T19:59:05.225Z, 294247-01-10T04:00:54.775Z]. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org