aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorJinfeng Ni <jni@maprtech.com>2014-05-30 11:07:03 -0700
committerJacques Nadeau <jacques@apache.org>2014-06-10 18:59:28 -0700
commit31b5962250675c45bcbe3c3fe6babeba5deb21fc (patch)
tree831067db75422132682c11a2b764d71396249a5c /common
parent1226af8bf7b131097c1c6c724d67d126a344570d (diff)
DRILL-927: Run-time code generation support for reading Complex Type.
Fix in RepeatedMapVector.
Diffstat (limited to 'common')
-rw-r--r--common/src/main/java/org/apache/drill/common/types/Types.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/common/src/main/java/org/apache/drill/common/types/Types.java b/common/src/main/java/org/apache/drill/common/types/Types.java
index e2c331056..10d84e1d1 100644
--- a/common/src/main/java/org/apache/drill/common/types/Types.java
+++ b/common/src/main/java/org/apache/drill/common/types/Types.java
@@ -46,6 +46,10 @@ public class Types {
return false;
}
+ public static boolean isRepeated(MajorType type){
+ return type.getMode() == REPEATED ;
+ }
+
public static boolean isNumericType(MajorType type){
if(type.getMode() == REPEATED) return false;
@@ -344,6 +348,8 @@ public class Types {
return withMode(MinorType.TIME, mode);
case "binary":
return withMode(MinorType.VARBINARY, mode);
+ case "json":
+ return withMode(MinorType.VARBINARY, mode);
default:
throw new UnsupportedOperationException("Could not determine type: " + typeName);
}