Repository: incubator-drill
Updated Branches:
  refs/heads/master a13fc39b0 -> 5c220e35a


DRILL-1405: Fix bug when loading repeated vectors with 0 valuecount


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

Branch: refs/heads/master
Commit: d8edf63781192923efb64a03de47df41242f309d
Parents: a13fc39
Author: Steven Phillips <sphill...@maprtech.com>
Authored: Fri Sep 12 00:43:41 2014 -0700
Committer: Steven Phillips <sphill...@maprtech.com>
Committed: Tue Sep 30 16:44:00 2014 -0700

----------------------------------------------------------------------
 .../java/org/apache/drill/exec/record/RecordBatchLoader.java     | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/d8edf637/exec/java-exec/src/main/java/org/apache/drill/exec/record/RecordBatchLoader.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/main/java/org/apache/drill/exec/record/RecordBatchLoader.java
 
b/exec/java-exec/src/main/java/org/apache/drill/exec/record/RecordBatchLoader.java
index d756685..8a12cbd 100644
--- 
a/exec/java-exec/src/main/java/org/apache/drill/exec/record/RecordBatchLoader.java
+++ 
b/exec/java-exec/src/main/java/org/apache/drill/exec/record/RecordBatchLoader.java
@@ -29,6 +29,7 @@ import org.apache.drill.exec.expr.TypeHelper;
 import org.apache.drill.exec.memory.BufferAllocator;
 import org.apache.drill.exec.proto.UserBitShared.RecordBatchDef;
 import org.apache.drill.exec.proto.UserBitShared.SerializedField;
+import org.apache.drill.exec.vector.AllocationHelper;
 import org.apache.drill.exec.vector.ValueVector;
 
 import com.google.common.collect.Maps;
@@ -84,7 +85,8 @@ public class RecordBatchLoader implements VectorAccessible, 
Iterable<VectorWrapp
       }
       if (fmd.getValueCount() == 0 && (!fmd.hasGroupCount() || 
fmd.getGroupCount() == 0)) {
 //        v.clear();
-        v.load(fmd, allocator.buffer(0));
+//        v.load(fmd, allocator.buffer(8));
+        AllocationHelper.allocate(v, 0, 0, 0);
       } else {
         v.load(fmd, buf.slice(bufOffset, fmd.getBufferLength()));
       }

Reply via email to