drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From par...@apache.org
Subject [1/5] drill git commit: DRILL-1886: Project on subquery containing a union all causes NPE
Date Thu, 18 Dec 2014 21:23:51 GMT
Repository: drill
Updated Branches:
  refs/heads/master 709e976d2 -> ac6e913bf


DRILL-1886: Project on subquery containing a union all causes NPE


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

Branch: refs/heads/master
Commit: ac6e913bfaea4b1f453f4b307b456e20dc341dfa
Parents: e10c219
Author: Parth Chandra <pchandra@maprtech.com>
Authored: Wed Dec 17 17:58:58 2014 -0800
Committer: Parth Chandra <pchandra@maprtech.com>
Committed: Wed Dec 17 22:27:28 2014 -0800

----------------------------------------------------------------------
 .../drill/exec/physical/impl/union/UnionAllRecordBatch.java    | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/ac6e913b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/union/UnionAllRecordBatch.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/union/UnionAllRecordBatch.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/union/UnionAllRecordBatch.java
index 78b53a5..99aec92 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/union/UnionAllRecordBatch.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/union/UnionAllRecordBatch.java
@@ -124,10 +124,8 @@ public class UnionAllRecordBatch extends AbstractRecordBatch<UnionAll>
{
 
   private void doTransfer() {
     outRecordCount = current.getRecordCount();
-    // skip empty batches
-    if (outRecordCount == 0) {
-      return;
-    }
+    // If the batch is empty we still need to set up the outgoing vectors otherwise the downstream
operators will get
+    // a NPE. SEE DRILL-1886
     if (container.getSchema().getSelectionVectorMode() == BatchSchema.SelectionVectorMode.TWO_BYTE)
{
       this.sv = current.getSelectionVector2();
     }


Mime
View raw message