You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by me...@apache.org on 2014/12/01 04:05:21 UTC
[3/3] drill git commit: DRILL-1641: Fix failure of kvgen(...) on
indexed repeated map.
DRILL-1641: Fix failure of kvgen(...) on indexed repeated map.
Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/3d836b51
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/3d836b51
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/3d836b51
Branch: refs/heads/merge_14_11_30_1
Commit: 3d836b5187e7e1a3c7f7a50eef4d482093e7889f
Parents: 4af4fcd
Author: dbarclay <db...@maprtech.com>
Authored: Thu Nov 20 16:57:34 2014 -0800
Committer: Mehant Baid <me...@gmail.com>
Committed: Sun Nov 30 16:45:53 2014 -0800
----------------------------------------------------------------------
.../java/org/apache/drill/exec/expr/fn/impl/MappifyUtility.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/drill/blob/3d836b51/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/MappifyUtility.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/MappifyUtility.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/MappifyUtility.java
index 349c709..e27234f 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/MappifyUtility.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/MappifyUtility.java
@@ -20,6 +20,9 @@ package org.apache.drill.exec.expr.fn.impl;
import com.google.common.base.Charsets;
import org.apache.drill.common.exceptions.DrillRuntimeException;
+import org.apache.drill.common.types.TypeProtos.DataMode;
+//import org.apache.drill.common.types.DataMode;
+import org.apache.drill.common.types.MinorType;
import org.apache.drill.common.types.TypeProtos;
import org.apache.drill.exec.expr.holders.VarCharHolder;
import org.apache.drill.exec.vector.complex.MapUtility;
@@ -39,7 +42,7 @@ public class MappifyUtility {
public static DrillBuf mappify(FieldReader reader, BaseWriter.ComplexWriter writer, DrillBuf buffer) {
// Currently we expect single map as input
- if (!(reader instanceof SingleMapReaderImpl)) {
+ if (DataMode.REPEATED == reader.getType().getMode() || !(reader.getType().getMinorType() == TypeProtos.MinorType.MAP)) {
throw new DrillRuntimeException("kvgen function only supports Simple maps as input");
}
BaseWriter.ListWriter listWriter = writer.rootAsList();