You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by ss...@apache.org on 2016/11/02 20:08:40 UTC

[18/18] phoenix git commit: PHOENIX-3423 PhoenixObjectInspector doesn't have information on length of the column.

PHOENIX-3423 PhoenixObjectInspector doesn't have information on length of the column.

Signed-off-by: Sergey Soldatov <ss...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/9aa18492
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/9aa18492
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/9aa18492

Branch: refs/heads/4.x-HBase-1.1
Commit: 9aa18492b54a54fdc9c03dc091bce52f68a9b216
Parents: 973f711
Author: Jeongdae Kim <kj...@gmail.com>
Authored: Mon Oct 31 12:36:00 2016 +0900
Committer: Sergey Soldatov <ss...@apache.org>
Committed: Wed Nov 2 13:01:47 2016 -0700

----------------------------------------------------------------------
 .../hive/objectinspector/PhoenixCharObjectInspector.java      | 7 ++++++-
 .../hive/objectinspector/PhoenixObjectInspectorFactory.java   | 2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/9aa18492/phoenix-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixCharObjectInspector.java
----------------------------------------------------------------------
diff --git a/phoenix-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixCharObjectInspector.java b/phoenix-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixCharObjectInspector.java
index 8d6aa8c..17222a2 100644
--- a/phoenix-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixCharObjectInspector.java
+++ b/phoenix-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixCharObjectInspector.java
@@ -20,6 +20,7 @@ package org.apache.phoenix.hive.objectinspector;
 import org.apache.hadoop.hive.common.type.HiveChar;
 import org.apache.hadoop.hive.serde2.io.HiveCharWritable;
 import org.apache.hadoop.hive.serde2.objectinspector.primitive.HiveCharObjectInspector;
+import org.apache.hadoop.hive.serde2.typeinfo.PrimitiveTypeInfo;
 import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory;
 
 /**
@@ -29,7 +30,11 @@ public class PhoenixCharObjectInspector extends AbstractPhoenixObjectInspector<H
         implements HiveCharObjectInspector {
 
     public PhoenixCharObjectInspector() {
-        super(TypeInfoFactory.charTypeInfo);
+        this(TypeInfoFactory.charTypeInfo);
+    }
+
+    public PhoenixCharObjectInspector(PrimitiveTypeInfo type) {
+        super(type);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/phoenix/blob/9aa18492/phoenix-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixObjectInspectorFactory.java
----------------------------------------------------------------------
diff --git a/phoenix-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixObjectInspectorFactory.java b/phoenix-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixObjectInspectorFactory.java
index 22be0fc..3a19ea7 100644
--- a/phoenix-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixObjectInspectorFactory.java
+++ b/phoenix-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixObjectInspectorFactory.java
@@ -102,7 +102,7 @@ public class PhoenixObjectInspectorFactory {
                                 serdeParams.getEscapeChar());
                         break;
                     case CHAR:
-                        oi = new PhoenixCharObjectInspector();
+                        oi = new PhoenixCharObjectInspector((PrimitiveTypeInfo)type);
                         break;
                     case DATE:
                         oi = new PhoenixDateObjectInspector();