drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jacq...@apache.org
Subject [1/9] git commit: DRILL-1107: Fix possible infinite loop in merging receiver
Date Wed, 09 Jul 2014 22:00:44 GMT
Repository: incubator-drill
Updated Branches:
  refs/heads/master 810a20409 -> 5b57294bf


DRILL-1107: Fix possible infinite loop in merging receiver

This bug was introduced in previous patch.


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

Branch: refs/heads/master
Commit: 84dc2dec1cf19b6d4253314418033835b1be6707
Parents: 810a204
Author: Steven Phillips <sphillips@maprtech.com>
Authored: Mon Jul 7 16:42:28 2014 -0700
Committer: Steven Phillips <sphillips@maprtech.com>
Committed: Tue Jul 8 02:35:30 2014 -0700

----------------------------------------------------------------------
 .../impl/mergereceiver/MergingRecordBatch.java       | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/84dc2dec/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/mergereceiver/MergingRecordBatch.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/mergereceiver/MergingRecordBatch.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/mergereceiver/MergingRecordBatch.java
index 914a187..ee957d9 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/mergereceiver/MergingRecordBatch.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/mergereceiver/MergingRecordBatch.java
@@ -391,13 +391,22 @@ public class MergingRecordBatch extends AbstractRecordBatch<MergingReceiverPOP>
     }
 
     // set the value counts in the outgoing vectors
-    for (VectorWrapper vw : outgoingContainer)
+    for (VectorWrapper vw : outgoingContainer) {
       vw.getValueVector().getMutator().setValueCount(outgoingPosition);
+    }
+
+    if (pqueue.isEmpty()) {
+      if (!done) {
+        done = !done;
+      }
+    }
 
-    if (schemaChanged)
+    if (schemaChanged) {
       return IterOutcome.OK_NEW_SCHEMA;
-    else
+    }
+    else {
       return IterOutcome.OK;
+    }
   }
 
   @Override


Mime
View raw message