Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-25980

remove unnecessary condition in IntervalJoinOperator

    XMLWordPrintableJSON

Details

    • Important

    Description

      Condition 'currentWatermark != Long.MIN_VALUE' covered by subsequent condition 'timestamp < currentWatermark' 

      org.apache.flink.streaming.api.operators.co.IntervalJoinOperator#isLate

      private boolean isLate(long timestamp) {
          long currentWatermark = internalTimerService.currentWatermark();
          return currentWatermark != Long.MIN_VALUE && timestamp < currentWatermark;
      } 

      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

      private boolean isLate(long timestamp) {
          long currentWatermark = internalTimerService.currentWatermark();
          return timestamp < currentWatermark;
      } 

       

       

      Attachments

        Issue Links

          Activity

            People

              hongshu hongshu
              hongshu hongshu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: