[ 
https://issues.apache.org/jira/browse/FLINK-25980?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

hongshu closed FLINK-25980.
---------------------------

> 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.12.7, 1.13.5, 1.14.2, 1.14.3
>            Reporter: hongshu
>            Assignee: hongshu
>            Priority: Major
>              Labels: pull-request-available, pull_request_available
>             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 it's 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)

Reply via email to