You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Fabian Paul (Jira)" <ji...@apache.org> on 2022/02/16 10:14:00 UTC
[jira] [Resolved] (FLINK-25980) remove unnecessary condition in IntervalJoinOperator
[ https://issues.apache.org/jira/browse/FLINK-25980?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Fabian Paul resolved FLINK-25980.
---------------------------------
Fix Version/s: 1.15.0
Resolution: Fixed
> 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)