drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ar...@apache.org
Subject [4/5] drill git commit: DRILL-5083: status.getOutcome() return FAILURE if one of the batches has STOP status (to avoid infinite loop in Merge Join).
Date Fri, 21 Jul 2017 17:23:40 GMT
DRILL-5083: status.getOutcome() return FAILURE if one of the batches has STOP status (to avoid
infinite loop in Merge Join).

closes #881


Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/368bc38b
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/368bc38b
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/368bc38b

Branch: refs/heads/master
Commit: 368bc38b162e43c7c9e6ce302ede87bccf019052
Parents: 943a143
Author: Roman Kulyk <rom.kulyk@gmail.com>
Authored: Thu Jul 20 16:33:49 2017 +0300
Committer: Arina Ielchiieva <arina.yelchiyeva@gmail.com>
Committed: Fri Jul 21 19:38:16 2017 +0300

----------------------------------------------------------------------
 .../org/apache/drill/exec/physical/impl/join/JoinStatus.java  | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/368bc38b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/JoinStatus.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/JoinStatus.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/JoinStatus.java
index 8e48515..527c984 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/JoinStatus.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/JoinStatus.java
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -138,7 +138,8 @@ public final class JoinStatus {
    *  4. JoinOutcome.SCHEMA_CHANGED : one of the side has change in schema.
    */
   public JoinOutcome getOutcome() {
-    if (!ok) {
+    // on STOP, OUT_OF_MEMORY return FAILURE.
+    if (!ok || eitherMatches(IterOutcome.STOP)) {
       return JoinOutcome.FAILURE;
     }
     if (hasMoreData) {
@@ -162,7 +163,7 @@ public final class JoinStatus {
       return JoinOutcome.WAITING;
     }
     ok = false;
-    // on STOP, OUT_OF_MEMORY return FAILURE.
+
     return JoinOutcome.FAILURE;
   }
 


Mime
View raw message