drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject [11/16] incubator-drill git commit: DRILL-1539: fix an issue regarding populateEmpties in RepeatedMapVector
Date Sat, 08 Nov 2014 00:03:12 GMT
DRILL-1539: fix an issue regarding populateEmpties in RepeatedMapVector


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

Branch: refs/heads/master
Commit: 76df2ffe6a7ad999557fdf5f1bdf3d76288e65a3
Parents: 70993d2
Author: Hanifi Gunes <hgunes@maprtech.com>
Authored: Tue Oct 21 23:16:47 2014 -0700
Committer: Jinfeng Ni <jni@maprtech.com>
Committed: Fri Nov 7 10:50:56 2014 -0800

----------------------------------------------------------------------
 .../org/apache/drill/exec/vector/complex/RepeatedMapVector.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/76df2ffe/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 d73aa7f..99b9453 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
@@ -360,6 +360,7 @@ public class RepeatedMapVector extends AbstractContainerVector implements
Repeat
     public boolean copyValueSafe(int srcIndex, int destIndex) {
       RepeatedMapHolder holder = new RepeatedMapHolder();
       accessor.get(srcIndex, holder);
+      to.populateEmpties(destIndex+1);
       int newIndex = to.offsets.getAccessor().get(destIndex);
       //todo: make these bulk copies
       for (int i = holder.start; i < holder.end; i++, newIndex++) {
@@ -372,7 +373,6 @@ public class RepeatedMapVector extends AbstractContainerVector implements
Repeat
       if (!to.offsets.getMutator().setSafe(destIndex+1, newIndex)) {
         return false;
       }
-      to.lastPopulatedValueIndex = destIndex;
       return true;
     }
 
@@ -609,6 +609,7 @@ public class RepeatedMapVector extends AbstractContainerVector implements
Repeat
   @Override
   public void clear() {
     getMutator().reset();
+
     offsets.clear();
     for(ValueVector v : vectors.values()) {
       v.clear();;


Mime
View raw message