drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jacq...@apache.org
Subject [10/10] incubator-drill git commit: DRILL-1705: Fix bug when loading nested repeated vectors
Date Thu, 13 Nov 2014 17:18:54 GMT
DRILL-1705: Fix bug when loading nested repeated vectors


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

Branch: refs/heads/master
Commit: fd54e71e80f083a1b74ee6e702485daa6bc50d13
Parents: b37dc08
Author: Steven Phillips <sphillips@maprtech.com>
Authored: Thu Nov 13 02:37:18 2014 -0800
Committer: Jacques Nadeau <jacques@apache.org>
Committed: Thu Nov 13 09:17:40 2014 -0800

----------------------------------------------------------------------
 .../main/java/org/apache/drill/exec/vector/complex/MapVector.java  | 2 +-
 .../org/apache/drill/exec/vector/complex/RepeatedMapVector.java    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/fd54e71e/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/MapVector.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/MapVector.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/MapVector.java
index 8fb56e6..d8bd525 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/MapVector.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/MapVector.java
@@ -336,7 +336,7 @@ public class MapVector extends AbstractContainerVector {
         v = TypeHelper.getNewVector(fieldDef, allocator);
         put(fieldDef.getLastName(), v);
       }
-      if (fmd.getValueCount() == 0) {
+      if (fmd.getValueCount() == 0 && (!fmd.hasGroupCount() || fmd.getGroupCount()
== 0)) {
         v.clear();
       } else {
         v.load(fmd, buf.slice(bufOffset, fmd.getBufferLength()));

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/fd54e71e/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/RepeatedMapVector.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/RepeatedMapVector.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/RepeatedMapVector.java
index 1b01c55..01ca841 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/RepeatedMapVector.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/RepeatedMapVector.java
@@ -462,7 +462,7 @@ public class RepeatedMapVector extends AbstractContainerVector implements
Repeat
         v = TypeHelper.getNewVector(fieldDef, allocator);
         put(fieldDef.getLastName(), v);
       }
-      if (fmd.getValueCount() == 0) {
+      if (fmd.getValueCount() == 0 && (!fmd.hasGroupCount() || fmd.getGroupCount()
== 0)) {
         v.clear();
       } else {
         v.load(fmd, buf.slice(bufOffset, fmd.getBufferLength()));


Mime
View raw message