DRILL-1249: ensure ResultBatchLoader to check group count to determine if incoming batch has empty values for repeated fields
Project: http://git-wip-us.apache.org/repos/asf/incubator-drill/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-drill/commit/1620d503 Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/1620d503 Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/1620d503 Branch: refs/heads/master Commit: 1620d503e59a1f6cea8584b6ba3b25759d6fd131 Parents: d215801 Author: Hanifi Gunes <hgu...@maprtech.com> Authored: Mon Aug 11 11:40:54 2014 -0700 Committer: Jacques Nadeau <jacq...@apache.org> Committed: Mon Aug 11 21:09:10 2014 -0700 ---------------------------------------------------------------------- .../main/java/org/apache/drill/exec/record/RecordBatchLoader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/1620d503/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 ce58f3b..0caed7d 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 @@ -83,7 +83,7 @@ public class RecordBatchLoader implements VectorAccessible, Iterable<VectorWrapp schemaChanged = true; v = TypeHelper.getNewVector(fieldDef, allocator); } - if (fmd.getValueCount() == 0){ + if (fmd.getValueCount() == 0 && (!fmd.hasGroupCount() || fmd.getGroupCount() == 0)) { // v.clear(); v.load(fmd, new EmptyByteBuf(allocator.getUnderlyingAllocator())); } else {