mxm commented on code in PR #15884:
URL: https://github.com/apache/iceberg/pull/15884#discussion_r3080423015
##########
flink/v2.1/flink/src/main/java/org/apache/iceberg/flink/source/reader/WatermarkExtractorRecordEmitter.java:
##########
@@ -44,7 +44,8 @@ class WatermarkExtractorRecordEmitter<T> implements
SerializableRecordEmitter<T>
public void emitRecord(
RecordAndPosition<T> element, SourceOutput<T> output, IcebergSourceSplit
split) {
if (!split.splitId().equals(lastSplitId)) {
- long newWatermark = timeExtractor.extractWatermark(split);
+ long extracted = timeExtractor.extractWatermark(split);
+ long newWatermark = extracted > Long.MIN_VALUE ? extracted - 1 :
Long.MIN_VALUE;
Review Comment:
Can we add a comment here, why we are doing this? For future readers. It
isn't obvious for everybody that `extractWatermark` extracts `watermark + 1`.
--
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]