You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by vg...@apache.org on 2018/04/20 05:37:11 UTC

[2/2] hive git commit: HIVE-18816 : CREATE TABLE (ACID) doesn't work with TIMESTAMPLOCALTZ column type (Igor Kryvenko via Ashutosh Chauhan)

HIVE-18816 : CREATE TABLE (ACID) doesn't work with TIMESTAMPLOCALTZ column type (Igor Kryvenko via Ashutosh Chauhan)

Signed-off-by: Ashutosh Chauhan <ha...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/34edad28
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/34edad28
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/34edad28

Branch: refs/heads/branch-3
Commit: 34edad28c84cd84f6c34e34e00c985100307ce57
Parents: 8bfea2d
Author: Igor Kryvenko <kr...@gmail.com>
Authored: Sat Apr 14 10:11:14 2018 -0700
Committer: Vineet Garg <vg...@apache.org>
Committed: Thu Apr 19 22:35:29 2018 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hive/ql/io/orc/OrcStruct.java  |  2 ++
 .../queries/clientpositive/orc_timestamplocaltz_type.q    |  5 +++++
 .../clientpositive/orc_timestamplocaltz_type.q.out        | 10 ++++++++++
 3 files changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/34edad28/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcStruct.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcStruct.java b/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcStruct.java
index 9e476fa..c81bcfe 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcStruct.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcStruct.java
@@ -542,6 +542,8 @@ final public class OrcStruct implements Writable {
           case DECIMAL:
             return PrimitiveObjectInspectorFactory.getPrimitiveWritableObjectInspector(
                 (PrimitiveTypeInfo)info);
+        case TIMESTAMPLOCALTZ:
+          return PrimitiveObjectInspectorFactory.getPrimitiveWritableObjectInspector((PrimitiveTypeInfo) info);
           default:
             throw new IllegalArgumentException("Unknown primitive type " +
               ((PrimitiveTypeInfo) info).getPrimitiveCategory());

http://git-wip-us.apache.org/repos/asf/hive/blob/34edad28/ql/src/test/queries/clientpositive/orc_timestamplocaltz_type.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/orc_timestamplocaltz_type.q b/ql/src/test/queries/clientpositive/orc_timestamplocaltz_type.q
new file mode 100644
index 0000000..fbe702e
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/orc_timestamplocaltz_type.q
@@ -0,0 +1,5 @@
+set hive.support.concurrency=true;
+set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;
+
+CREATE TABLE table_acid(d int, tz timestamp with local time zone)
+    clustered by (d) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true');
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hive/blob/34edad28/ql/src/test/results/clientpositive/orc_timestamplocaltz_type.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/orc_timestamplocaltz_type.q.out b/ql/src/test/results/clientpositive/orc_timestamplocaltz_type.q.out
new file mode 100644
index 0000000..fe3bb5c
--- /dev/null
+++ b/ql/src/test/results/clientpositive/orc_timestamplocaltz_type.q.out
@@ -0,0 +1,10 @@
+PREHOOK: query: CREATE TABLE table_acid(d int, tz timestamp with local time zone)
+    clustered by (d) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true')
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@table_acid
+POSTHOOK: query: CREATE TABLE table_acid(d int, tz timestamp with local time zone)
+    clustered by (d) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true')
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@table_acid