hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ych...@apache.org
Subject hive git commit: HIVE-12795: Vectorized execution causes ClassCastException (Yongzhi Chen, reviewed by Aihua Xu)
Date Mon, 11 Jan 2016 15:29:25 GMT
Repository: hive
Updated Branches:
  refs/heads/branch-1 002a61683 -> 9b5f1ff3c


HIVE-12795: Vectorized execution causes ClassCastException (Yongzhi Chen, reviewed by Aihua
Xu)


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

Branch: refs/heads/branch-1
Commit: 9b5f1ff3cc52cd504ea744685a0dcba3a0885b8a
Parents: 002a616
Author: Yongzhi Chen <ychena@apache.org>
Authored: Thu Jan 7 10:15:40 2016 -0500
Committer: Yongzhi Chen <ychen@cloudera.com>
Committed: Mon Jan 11 10:22:19 2016 -0500

----------------------------------------------------------------------
 .../VectorExpressionWriterFactory.java          |   3 +-
 .../test/queries/clientpositive/vector_join.q   |  43 ++++++++
 .../results/clientpositive/vector_join.q.out    | 104 +++++++++++++++++++
 3 files changed, 149 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/9b5f1ff3/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorExpressionWriterFactory.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorExpressionWriterFactory.java
b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorExpressionWriterFactory.java
index bbf8862..d57a767 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorExpressionWriterFactory.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorExpressionWriterFactory.java
@@ -1212,7 +1212,8 @@ public final class VectorExpressionWriterFactory {
     ArrayList<String> columnNames = new ArrayList<String>();
     int i = 0;
     for(StructField field : fields) {
-      ObjectInspector fieldObjInsp = field.getFieldObjectInspector();
+      ObjectInspector fieldObjInsp = TypeInfoUtils.getStandardWritableObjectInspectorFromTypeInfo(
+                TypeInfoUtils.getTypeInfoFromObjectInspector(field.getFieldObjectInspector()));
       writers[i] = VectorExpressionWriterFactory.
                 genVectorExpressionWritable(fieldObjInsp);
       columnNames.add(field.getFieldName());

http://git-wip-us.apache.org/repos/asf/hive/blob/9b5f1ff3/ql/src/test/queries/clientpositive/vector_join.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/vector_join.q b/ql/src/test/queries/clientpositive/vector_join.q
new file mode 100644
index 0000000..9238a6e
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/vector_join.q
@@ -0,0 +1,43 @@
+DROP TABLE IF EXISTS test1_vc;
+DROP TABLE IF EXISTS test2_vc;
+CREATE TABLE test1_vc
+ (
+   id string)
+   PARTITIONED BY (
+  cr_year bigint,
+  cr_month bigint)
+ ROW FORMAT SERDE
+  'org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe'
+STORED AS INPUTFORMAT
+  'org.apache.hadoop.hive.ql.io.RCFileInputFormat'
+OUTPUTFORMAT
+  'org.apache.hadoop.hive.ql.io.RCFileOutputFormat'
+TBLPROPERTIES (
+  'serialization.null.format'='' );
+CREATE TABLE test2_vc(
+    id string
+  )
+   PARTITIONED BY (
+  cr_year bigint,
+  cr_month bigint)
+ROW FORMAT SERDE
+  'org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe'
+STORED AS INPUTFORMAT
+  'org.apache.hadoop.hive.ql.io.RCFileInputFormat'
+OUTPUTFORMAT
+  'org.apache.hadoop.hive.ql.io.RCFileOutputFormat'
+TBLPROPERTIES (
+  'serialization.null.format'=''
+ );
+set hive.auto.convert.join=false;
+set hive.vectorized.execution.enabled = true;
+set hive.mapred.mode=nonstrict;
+SELECT cr.id1 ,
+cr.id2
+FROM
+(SELECT t1.id id1,
+ t2.id id2
+ from
+ (select * from test1_vc ) t1
+ left outer join test2_vc  t2
+ on t1.id=t2.id) cr;

http://git-wip-us.apache.org/repos/asf/hive/blob/9b5f1ff3/ql/src/test/results/clientpositive/vector_join.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/vector_join.q.out b/ql/src/test/results/clientpositive/vector_join.q.out
new file mode 100644
index 0000000..94c0290
--- /dev/null
+++ b/ql/src/test/results/clientpositive/vector_join.q.out
@@ -0,0 +1,104 @@
+PREHOOK: query: DROP TABLE IF EXISTS test1_vc
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: DROP TABLE IF EXISTS test1_vc
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: DROP TABLE IF EXISTS test2_vc
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: DROP TABLE IF EXISTS test2_vc
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: CREATE TABLE test1_vc
+ (
+   id string)
+   PARTITIONED BY (
+  cr_year bigint,
+  cr_month bigint)
+ ROW FORMAT SERDE
+  'org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe'
+STORED AS INPUTFORMAT
+  'org.apache.hadoop.hive.ql.io.RCFileInputFormat'
+OUTPUTFORMAT
+  'org.apache.hadoop.hive.ql.io.RCFileOutputFormat'
+TBLPROPERTIES (
+  'serialization.null.format'='' )
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@test1_vc
+POSTHOOK: query: CREATE TABLE test1_vc
+ (
+   id string)
+   PARTITIONED BY (
+  cr_year bigint,
+  cr_month bigint)
+ ROW FORMAT SERDE
+  'org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe'
+STORED AS INPUTFORMAT
+  'org.apache.hadoop.hive.ql.io.RCFileInputFormat'
+OUTPUTFORMAT
+  'org.apache.hadoop.hive.ql.io.RCFileOutputFormat'
+TBLPROPERTIES (
+  'serialization.null.format'='' )
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@test1_vc
+PREHOOK: query: CREATE TABLE test2_vc(
+    id string
+  )
+   PARTITIONED BY (
+  cr_year bigint,
+  cr_month bigint)
+ROW FORMAT SERDE
+  'org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe'
+STORED AS INPUTFORMAT
+  'org.apache.hadoop.hive.ql.io.RCFileInputFormat'
+OUTPUTFORMAT
+  'org.apache.hadoop.hive.ql.io.RCFileOutputFormat'
+TBLPROPERTIES (
+  'serialization.null.format'=''
+ )
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@test2_vc
+POSTHOOK: query: CREATE TABLE test2_vc(
+    id string
+  )
+   PARTITIONED BY (
+  cr_year bigint,
+  cr_month bigint)
+ROW FORMAT SERDE
+  'org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe'
+STORED AS INPUTFORMAT
+  'org.apache.hadoop.hive.ql.io.RCFileInputFormat'
+OUTPUTFORMAT
+  'org.apache.hadoop.hive.ql.io.RCFileOutputFormat'
+TBLPROPERTIES (
+  'serialization.null.format'=''
+ )
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@test2_vc
+PREHOOK: query: SELECT cr.id1 ,
+cr.id2
+FROM
+(SELECT t1.id id1,
+ t2.id id2
+ from
+ (select * from test1_vc ) t1
+ left outer join test2_vc  t2
+ on t1.id=t2.id) cr
+PREHOOK: type: QUERY
+PREHOOK: Input: default@test1_vc
+PREHOOK: Input: default@test2_vc
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT cr.id1 ,
+cr.id2
+FROM
+(SELECT t1.id id1,
+ t2.id id2
+ from
+ (select * from test1_vc ) t1
+ left outer join test2_vc  t2
+ on t1.id=t2.id) cr
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@test1_vc
+POSTHOOK: Input: default@test2_vc
+#### A masked pattern was here ####


Mime
View raw message