You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by kk...@apache.org on 2019/01/09 15:48:35 UTC

[flink] 02/04: [hotfix] Avoid redundant state access in TemporalProcessTimeJoin.

This is an automated email from the ASF dual-hosted git repository.

kkloudas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 228d797a051abcf9e093bb027ea00f1e668db089
Author: Kostas Kloudas <kk...@gmail.com>
AuthorDate: Mon Nov 26 16:36:58 2018 +0100

    [hotfix] Avoid redundant state access in TemporalProcessTimeJoin.
---
 .../org/apache/flink/table/runtime/join/TemporalProcessTimeJoin.scala | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/join/TemporalProcessTimeJoin.scala b/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/join/TemporalProcessTimeJoin.scala
index 7a8bb61..2d9fdf3 100644
--- a/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/join/TemporalProcessTimeJoin.scala
+++ b/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/join/TemporalProcessTimeJoin.scala
@@ -74,13 +74,13 @@ class TemporalProcessTimeJoin(
 
   override def processElement1(element: StreamRecord[CRow]): Unit = {
 
-    if (rightState.value() == null) {
+    val rightSideRow = rightState.value()
+    if (rightSideRow == null) {
       return
     }
 
     cRowWrapper.setChange(element.getValue.change)
 
-    val rightSideRow = rightState.value()
     joinFunction.join(element.getValue.row, rightSideRow, cRowWrapper)
   }