hongshu created FLINK-25980: ------------------------------- Summary: remove unnecessary condition in IntervalJoinOperator Key: FLINK-25980 URL: https://issues.apache.org/jira/browse/FLINK-25980 Project: Flink Issue Type: Improvement Components: API / DataStream Affects Versions: 1.14.3, 1.14.2, 1.13.5, 1.12.7, 1.11.6 Reporter: hongshu Fix For: 1.15.0
Condition 'currentWatermark != Long.MIN_VALUE' covered by subsequent condition 'timestamp < currentWatermark' org.apache.flink.streaming.api.operators.co.IntervalJoinOperator#isLate {code:java} private boolean isLate(long timestamp) { long currentWatermark = internalTimerService.currentWatermark(); return currentWatermark != Long.MIN_VALUE && timestamp < currentWatermark; } {code} if currentWatermark == Long.MIN_VALUE, timestamp < currentWatermark is also return false, so condition currentWatermark != Long.MIN_VALUE is unnecessary We can use the following code directly {code:java} private boolean isLate(long timestamp) { long currentWatermark = internalTimerService.currentWatermark(); return timestamp < currentWatermark; } {code} -- This message was sent by Atlassian Jira (v8.20.1#820001)