You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by mm...@apache.org on 2018/02/16 15:52:22 UTC
[08/32] hive git commit: HIVE-18622: Vectorization: IF Statements,
Comparisons, and more do not handle NULLs correctly (Matt McCline,
reviewed by Sergey Shelukhin, Deepak Jaiswal, Vihang Karajgaonkar)
http://git-wip-us.apache.org/repos/asf/hive/blob/a4689020/ql/src/test/results/clientpositive/spark/vectorized_case.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/vectorized_case.q.out b/ql/src/test/results/clientpositive/spark/vectorized_case.q.out
index c1dd74c..8fff1ed 100644
--- a/ql/src/test/results/clientpositive/spark/vectorized_case.q.out
+++ b/ql/src/test/results/clientpositive/spark/vectorized_case.q.out
@@ -1,4 +1,4 @@
-PREHOOK: query: explain vectorization expression
+PREHOOK: query: explain vectorization detail
select
csmallint,
case
@@ -16,7 +16,7 @@ where csmallint = 418
or csmallint = 12205
or csmallint = 10583
PREHOOK: type: QUERY
-POSTHOOK: query: explain vectorization expression
+POSTHOOK: query: explain vectorization detail
select
csmallint,
case
@@ -54,6 +54,7 @@ STAGE PLANS:
Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE
TableScan Vectorization:
native: true
+ vectorizationSchemaColumns: [0:ctinyint:tinyint, 1:csmallint:smallint, 2:cint:int, 3:cbigint:bigint, 4:cfloat:float, 5:cdouble:double, 6:cstring1:string, 7:cstring2:string, 8:ctimestamp1:timestamp, 9:ctimestamp2:timestamp, 10:cboolean1:boolean, 11:cboolean2:boolean, 12:ROW__ID:struct<transactionid:bigint,bucketid:int,rowid:bigint>]
Filter Operator
Filter Vectorization:
className: VectorFilterOperator
@@ -90,6 +91,12 @@ STAGE PLANS:
allNative: false
usesVectorUDFAdaptor: false
vectorized: true
+ rowBatchContext:
+ dataColumnCount: 12
+ includeColumns: [1]
+ dataColumns: ctinyint:tinyint, csmallint:smallint, cint:int, cbigint:bigint, cfloat:float, cdouble:double, cstring1:string, cstring2:string, ctimestamp1:timestamp, ctimestamp2:timestamp, cboolean1:boolean, cboolean2:boolean
+ partitionColumnCount: 0
+ scratchColumnTypeNames: [bigint, bigint, string, string, string]
Stage: Stage-0
Fetch Operator
@@ -139,7 +146,7 @@ POSTHOOK: Input: default@alltypesorc
10583 c c
418 a a
12205 b b
-PREHOOK: query: explain vectorization expression
+PREHOOK: query: explain vectorization detail
select
csmallint,
case
@@ -157,7 +164,7 @@ where csmallint = 418
or csmallint = 12205
or csmallint = 10583
PREHOOK: type: QUERY
-POSTHOOK: query: explain vectorization expression
+POSTHOOK: query: explain vectorization detail
select
csmallint,
case
@@ -195,6 +202,7 @@ STAGE PLANS:
Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE
TableScan Vectorization:
native: true
+ vectorizationSchemaColumns: [0:ctinyint:tinyint, 1:csmallint:smallint, 2:cint:int, 3:cbigint:bigint, 4:cfloat:float, 5:cdouble:double, 6:cstring1:string, 7:cstring2:string, 8:ctimestamp1:timestamp, 9:ctimestamp2:timestamp, 10:cboolean1:boolean, 11:cboolean2:boolean, 12:ROW__ID:struct<transactionid:bigint,bucketid:int,rowid:bigint>]
Filter Operator
Filter Vectorization:
className: VectorFilterOperator
@@ -231,6 +239,12 @@ STAGE PLANS:
allNative: false
usesVectorUDFAdaptor: false
vectorized: true
+ rowBatchContext:
+ dataColumnCount: 12
+ includeColumns: [1]
+ dataColumns: ctinyint:tinyint, csmallint:smallint, cint:int, cbigint:bigint, cfloat:float, cdouble:double, cstring1:string, cstring2:string, ctimestamp1:timestamp, ctimestamp2:timestamp, cboolean1:boolean, cboolean2:boolean
+ partitionColumnCount: 0
+ scratchColumnTypeNames: [bigint, bigint, string, string, string, bigint, string, string]
Stage: Stage-0
Fetch Operator
@@ -238,13 +252,13 @@ STAGE PLANS:
Processor Tree:
ListSink
-PREHOOK: query: explain vectorization expression
+PREHOOK: query: explain vectorization detail
select
sum(case when cint % 2 = 0 then 1 else 0 end) as ceven,
sum(case when cint % 2 = 1 then 1 else 0 end) as codd
from alltypesorc
PREHOOK: type: QUERY
-POSTHOOK: query: explain vectorization expression
+POSTHOOK: query: explain vectorization detail
select
sum(case when cint % 2 = 0 then 1 else 0 end) as ceven,
sum(case when cint % 2 = 1 then 1 else 0 end) as codd
@@ -272,6 +286,7 @@ STAGE PLANS:
Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE
TableScan Vectorization:
native: true
+ vectorizationSchemaColumns: [0:ctinyint:tinyint, 1:csmallint:smallint, 2:cint:int, 3:cbigint:bigint, 4:cfloat:float, 5:cdouble:double, 6:cstring1:string, 7:cstring2:string, 8:ctimestamp1:timestamp, 9:ctimestamp2:timestamp, 10:cboolean1:boolean, 11:cboolean2:boolean, 12:ROW__ID:struct<transactionid:bigint,bucketid:int,rowid:bigint>]
Select Operator
expressions: CASE WHEN (((cint % 2) = 0)) THEN (1) ELSE (0) END (type: int), CASE WHEN (((cint % 2) = 1)) THEN (1) ELSE (0) END (type: int)
outputColumnNames: _col0, _col1
@@ -297,8 +312,10 @@ STAGE PLANS:
sort order:
Reduce Sink Vectorization:
className: VectorReduceSinkEmptyKeyOperator
+ keyColumnNums: []
native: true
nativeConditionsMet: hive.vectorized.execution.reducesink.new.enabled IS true, hive.execution.engine spark IN [tez, spark] IS true, No PTF TopN IS true, No DISTINCT columns IS true, BinarySortableSerDe for keys IS true, LazyBinarySerDe for values IS true
+ valueColumnNums: [0, 1]
Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: NONE
value expressions: _col0 (type: bigint), _col1 (type: bigint)
Execution mode: vectorized
@@ -311,14 +328,27 @@ STAGE PLANS:
allNative: false
usesVectorUDFAdaptor: false
vectorized: true
+ rowBatchContext:
+ dataColumnCount: 12
+ includeColumns: [2]
+ dataColumns: ctinyint:tinyint, csmallint:smallint, cint:int, cbigint:bigint, cfloat:float, cdouble:double, cstring1:string, cstring2:string, ctimestamp1:timestamp, ctimestamp2:timestamp, cboolean1:boolean, cboolean2:boolean
+ partitionColumnCount: 0
+ scratchColumnTypeNames: [bigint, bigint, bigint]
Reducer 2
Execution mode: vectorized
Reduce Vectorization:
enabled: true
enableConditionsMet: hive.vectorized.execution.reduce.enabled IS true, hive.execution.engine spark IN [tez, spark] IS true
+ reduceColumnNullOrder:
+ reduceColumnSortOrder:
allNative: false
usesVectorUDFAdaptor: false
vectorized: true
+ rowBatchContext:
+ dataColumnCount: 2
+ dataColumns: VALUE._col0:bigint, VALUE._col1:bigint
+ partitionColumnCount: 0
+ scratchColumnTypeNames: []
Reduce Operator Tree:
Group By Operator
aggregations: sum(VALUE._col0), sum(VALUE._col1)
@@ -363,14 +393,14 @@ from alltypesorc
POSTHOOK: type: QUERY
POSTHOOK: Input: default@alltypesorc
#### A masked pattern was here ####
-5110 4607
-PREHOOK: query: explain vectorization expression
+4086 3583
+PREHOOK: query: explain vectorization detail
select
sum(case when cint % 2 = 0 then cint else 0 end) as ceven,
sum(case when cint % 2 = 1 then cint else 0 end) as codd
from alltypesorc
PREHOOK: type: QUERY
-POSTHOOK: query: explain vectorization expression
+POSTHOOK: query: explain vectorization detail
select
sum(case when cint % 2 = 0 then cint else 0 end) as ceven,
sum(case when cint % 2 = 1 then cint else 0 end) as codd
@@ -398,6 +428,7 @@ STAGE PLANS:
Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE
TableScan Vectorization:
native: true
+ vectorizationSchemaColumns: [0:ctinyint:tinyint, 1:csmallint:smallint, 2:cint:int, 3:cbigint:bigint, 4:cfloat:float, 5:cdouble:double, 6:cstring1:string, 7:cstring2:string, 8:ctimestamp1:timestamp, 9:ctimestamp2:timestamp, 10:cboolean1:boolean, 11:cboolean2:boolean, 12:ROW__ID:struct<transactionid:bigint,bucketid:int,rowid:bigint>]
Select Operator
expressions: CASE WHEN (((cint % 2) = 0)) THEN (cint) ELSE (0) END (type: int), CASE WHEN (((cint % 2) = 1)) THEN (cint) ELSE (0) END (type: int)
outputColumnNames: _col0, _col1
@@ -423,8 +454,10 @@ STAGE PLANS:
sort order:
Reduce Sink Vectorization:
className: VectorReduceSinkEmptyKeyOperator
+ keyColumnNums: []
native: true
nativeConditionsMet: hive.vectorized.execution.reducesink.new.enabled IS true, hive.execution.engine spark IN [tez, spark] IS true, No PTF TopN IS true, No DISTINCT columns IS true, BinarySortableSerDe for keys IS true, LazyBinarySerDe for values IS true
+ valueColumnNums: [0, 1]
Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: NONE
value expressions: _col0 (type: bigint), _col1 (type: bigint)
Execution mode: vectorized
@@ -437,14 +470,27 @@ STAGE PLANS:
allNative: false
usesVectorUDFAdaptor: false
vectorized: true
+ rowBatchContext:
+ dataColumnCount: 12
+ includeColumns: [2]
+ dataColumns: ctinyint:tinyint, csmallint:smallint, cint:int, cbigint:bigint, cfloat:float, cdouble:double, cstring1:string, cstring2:string, ctimestamp1:timestamp, ctimestamp2:timestamp, cboolean1:boolean, cboolean2:boolean
+ partitionColumnCount: 0
+ scratchColumnTypeNames: [bigint, bigint, bigint]
Reducer 2
Execution mode: vectorized
Reduce Vectorization:
enabled: true
enableConditionsMet: hive.vectorized.execution.reduce.enabled IS true, hive.execution.engine spark IN [tez, spark] IS true
+ reduceColumnNullOrder:
+ reduceColumnSortOrder:
allNative: false
usesVectorUDFAdaptor: false
vectorized: true
+ rowBatchContext:
+ dataColumnCount: 2
+ dataColumns: VALUE._col0:bigint, VALUE._col1:bigint
+ partitionColumnCount: 0
+ scratchColumnTypeNames: []
Reduce Operator Tree:
Group By Operator
aggregations: sum(VALUE._col0), sum(VALUE._col1)
@@ -508,10 +554,10 @@ POSTHOOK: Input: _dummy_database@_dummy_table
POSTHOOK: Output: default@test_1
POSTHOOK: Lineage: test_1.attr SCRIPT []
POSTHOOK: Lineage: test_1.member SCRIPT []
-PREHOOK: query: EXPLAIN VECTORIZATION EXPRESSION
+PREHOOK: query: EXPLAIN VECTORIZATION DETAIL
SELECT CASE WHEN member =1.0 THEN attr+1.0 ELSE attr+2.0 END FROM test_1
PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN VECTORIZATION EXPRESSION
+POSTHOOK: query: EXPLAIN VECTORIZATION DETAIL
SELECT CASE WHEN member =1.0 THEN attr+1.0 ELSE attr+2.0 END FROM test_1
POSTHOOK: type: QUERY
PLAN VECTORIZATION:
@@ -534,6 +580,7 @@ STAGE PLANS:
Statistics: Num rows: 3 Data size: 672 Basic stats: COMPLETE Column stats: NONE
TableScan Vectorization:
native: true
+ vectorizationSchemaColumns: [0:member:decimal(10,0), 1:attr:decimal(10,0), 2:ROW__ID:struct<transactionid:bigint,bucketid:int,rowid:bigint>]
Select Operator
expressions: CASE WHEN ((member = 1)) THEN ((attr + 1)) ELSE ((attr + 2)) END (type: decimal(11,0))
outputColumnNames: _col0
@@ -563,6 +610,12 @@ STAGE PLANS:
allNative: false
usesVectorUDFAdaptor: true
vectorized: true
+ rowBatchContext:
+ dataColumnCount: 2
+ includeColumns: [0, 1]
+ dataColumns: member:decimal(10,0), attr:decimal(10,0)
+ partitionColumnCount: 0
+ scratchColumnTypeNames: [bigint, decimal(11,0), decimal(11,0), decimal(11,0)]
Stage: Stage-0
Fetch Operator
@@ -581,10 +634,10 @@ POSTHOOK: Input: default@test_1
3
4
4
-PREHOOK: query: EXPLAIN VECTORIZATION EXPRESSION
+PREHOOK: query: EXPLAIN VECTORIZATION DETAIL
SELECT CASE WHEN member =1.0 THEN 1.0 ELSE attr+2.0 END FROM test_1
PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN VECTORIZATION EXPRESSION
+POSTHOOK: query: EXPLAIN VECTORIZATION DETAIL
SELECT CASE WHEN member =1.0 THEN 1.0 ELSE attr+2.0 END FROM test_1
POSTHOOK: type: QUERY
PLAN VECTORIZATION:
@@ -607,6 +660,7 @@ STAGE PLANS:
Statistics: Num rows: 3 Data size: 672 Basic stats: COMPLETE Column stats: NONE
TableScan Vectorization:
native: true
+ vectorizationSchemaColumns: [0:member:decimal(10,0), 1:attr:decimal(10,0), 2:ROW__ID:struct<transactionid:bigint,bucketid:int,rowid:bigint>]
Select Operator
expressions: CASE WHEN ((member = 1)) THEN (1) ELSE ((attr + 2)) END (type: decimal(11,0))
outputColumnNames: _col0
@@ -636,6 +690,12 @@ STAGE PLANS:
allNative: false
usesVectorUDFAdaptor: true
vectorized: true
+ rowBatchContext:
+ dataColumnCount: 2
+ includeColumns: [0, 1]
+ dataColumns: member:decimal(10,0), attr:decimal(10,0)
+ partitionColumnCount: 0
+ scratchColumnTypeNames: [bigint, decimal(11,0), decimal(11,0)]
Stage: Stage-0
Fetch Operator
@@ -654,10 +714,10 @@ POSTHOOK: Input: default@test_1
3
4
1
-PREHOOK: query: EXPLAIN VECTORIZATION EXPRESSION
+PREHOOK: query: EXPLAIN VECTORIZATION DETAIL
SELECT CASE WHEN member =1.0 THEN attr+1.0 ELSE 2.0 END FROM test_1
PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN VECTORIZATION EXPRESSION
+POSTHOOK: query: EXPLAIN VECTORIZATION DETAIL
SELECT CASE WHEN member =1.0 THEN attr+1.0 ELSE 2.0 END FROM test_1
POSTHOOK: type: QUERY
PLAN VECTORIZATION:
@@ -680,6 +740,7 @@ STAGE PLANS:
Statistics: Num rows: 3 Data size: 672 Basic stats: COMPLETE Column stats: NONE
TableScan Vectorization:
native: true
+ vectorizationSchemaColumns: [0:member:decimal(10,0), 1:attr:decimal(10,0), 2:ROW__ID:struct<transactionid:bigint,bucketid:int,rowid:bigint>]
Select Operator
expressions: CASE WHEN ((member = 1)) THEN ((attr + 1)) ELSE (2) END (type: decimal(11,0))
outputColumnNames: _col0
@@ -709,6 +770,12 @@ STAGE PLANS:
allNative: false
usesVectorUDFAdaptor: true
vectorized: true
+ rowBatchContext:
+ dataColumnCount: 2
+ includeColumns: [0, 1]
+ dataColumns: member:decimal(10,0), attr:decimal(10,0)
+ partitionColumnCount: 0
+ scratchColumnTypeNames: [bigint, decimal(11,0), decimal(11,0)]
Stage: Stage-0
Fetch Operator
@@ -745,10 +812,10 @@ POSTHOOK: Input: _dummy_database@_dummy_table
POSTHOOK: Output: default@test_2
POSTHOOK: Lineage: test_2.attr SCRIPT []
POSTHOOK: Lineage: test_2.member SCRIPT []
-PREHOOK: query: EXPLAIN VECTORIZATION EXPRESSION
+PREHOOK: query: EXPLAIN VECTORIZATION DETAIL
SELECT CASE WHEN member=1 THEN attr+1 else attr+2 END FROM test_2
PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN VECTORIZATION EXPRESSION
+POSTHOOK: query: EXPLAIN VECTORIZATION DETAIL
SELECT CASE WHEN member=1 THEN attr+1 else attr+2 END FROM test_2
POSTHOOK: type: QUERY
PLAN VECTORIZATION:
@@ -771,6 +838,7 @@ STAGE PLANS:
Statistics: Num rows: 3 Data size: 48 Basic stats: COMPLETE Column stats: NONE
TableScan Vectorization:
native: true
+ vectorizationSchemaColumns: [0:member:bigint, 1:attr:bigint, 2:ROW__ID:struct<transactionid:bigint,bucketid:int,rowid:bigint>]
Select Operator
expressions: CASE WHEN ((member = 1)) THEN ((attr + 1)) ELSE ((attr + 2)) END (type: bigint)
outputColumnNames: _col0
@@ -800,6 +868,12 @@ STAGE PLANS:
allNative: false
usesVectorUDFAdaptor: false
vectorized: true
+ rowBatchContext:
+ dataColumnCount: 2
+ includeColumns: [0, 1]
+ dataColumns: member:bigint, attr:bigint
+ partitionColumnCount: 0
+ scratchColumnTypeNames: [bigint, bigint, bigint, bigint]
Stage: Stage-0
Fetch Operator
@@ -818,10 +892,10 @@ POSTHOOK: Input: default@test_2
3
4
4
-PREHOOK: query: EXPLAIN VECTORIZATION EXPRESSION
+PREHOOK: query: EXPLAIN VECTORIZATION DETAIL
SELECT CASE WHEN member=1 THEN null else attr+2 END FROM test_2
PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN VECTORIZATION EXPRESSION
+POSTHOOK: query: EXPLAIN VECTORIZATION DETAIL
SELECT CASE WHEN member=1 THEN null else attr+2 END FROM test_2
POSTHOOK: type: QUERY
PLAN VECTORIZATION:
@@ -844,6 +918,7 @@ STAGE PLANS:
Statistics: Num rows: 3 Data size: 48 Basic stats: COMPLETE Column stats: NONE
TableScan Vectorization:
native: true
+ vectorizationSchemaColumns: [0:member:bigint, 1:attr:bigint, 2:ROW__ID:struct<transactionid:bigint,bucketid:int,rowid:bigint>]
Select Operator
expressions: CASE WHEN ((member = 1)) THEN (null) ELSE ((attr + 2)) END (type: bigint)
outputColumnNames: _col0
@@ -873,6 +948,12 @@ STAGE PLANS:
allNative: false
usesVectorUDFAdaptor: false
vectorized: true
+ rowBatchContext:
+ dataColumnCount: 2
+ includeColumns: [0, 1]
+ dataColumns: member:bigint, attr:bigint
+ partitionColumnCount: 0
+ scratchColumnTypeNames: [bigint, bigint, bigint]
Stage: Stage-0
Fetch Operator
@@ -891,10 +972,10 @@ POSTHOOK: Input: default@test_2
3
4
NULL
-PREHOOK: query: EXPLAIN VECTORIZATION EXPRESSION
+PREHOOK: query: EXPLAIN VECTORIZATION DETAIL
SELECT CASE WHEN member=1 THEN attr+1 else null END FROM test_2
PREHOOK: type: QUERY
-POSTHOOK: query: EXPLAIN VECTORIZATION EXPRESSION
+POSTHOOK: query: EXPLAIN VECTORIZATION DETAIL
SELECT CASE WHEN member=1 THEN attr+1 else null END FROM test_2
POSTHOOK: type: QUERY
PLAN VECTORIZATION:
@@ -917,6 +998,7 @@ STAGE PLANS:
Statistics: Num rows: 3 Data size: 48 Basic stats: COMPLETE Column stats: NONE
TableScan Vectorization:
native: true
+ vectorizationSchemaColumns: [0:member:bigint, 1:attr:bigint, 2:ROW__ID:struct<transactionid:bigint,bucketid:int,rowid:bigint>]
Select Operator
expressions: CASE WHEN ((member = 1)) THEN ((attr + 1)) ELSE (null) END (type: bigint)
outputColumnNames: _col0
@@ -946,6 +1028,12 @@ STAGE PLANS:
allNative: false
usesVectorUDFAdaptor: false
vectorized: true
+ rowBatchContext:
+ dataColumnCount: 2
+ includeColumns: [0, 1]
+ dataColumns: member:bigint, attr:bigint
+ partitionColumnCount: 0
+ scratchColumnTypeNames: [bigint, bigint, bigint]
Stage: Stage-0
Fetch Operator
@@ -964,3 +1052,227 @@ POSTHOOK: Input: default@test_2
NULL
NULL
4
+PREHOOK: query: select count(*), sum(a.ceven)
+from (
+select
+ case when cint % 2 = 0 then 1 else 0 end as ceven
+from alltypesorc) a
+PREHOOK: type: QUERY
+PREHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
+POSTHOOK: query: select count(*), sum(a.ceven)
+from (
+select
+ case when cint % 2 = 0 then 1 else 0 end as ceven
+from alltypesorc) a
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
+12288 4086
+PREHOOK: query: select count(*)
+from (
+select
+ (case when cint % 2 = 0 then 1 else 0 end) as ceven
+from alltypesorc
+where (case when cint % 2 = 0 then 1 else 0 end) = 0) a
+PREHOOK: type: QUERY
+PREHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
+POSTHOOK: query: select count(*)
+from (
+select
+ (case when cint % 2 = 0 then 1 else 0 end) as ceven
+from alltypesorc
+where (case when cint % 2 = 0 then 1 else 0 end) = 0) a
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
+8202
+PREHOOK: query: select count(*)
+from (
+select
+ (case when cint % 2 = 0 then 1 else 0 end) as ceven
+from alltypesorc
+where (case when cint % 2 = 0 then 1 else 0 end) = 0 AND cint is NOT NULL) a
+PREHOOK: type: QUERY
+PREHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
+POSTHOOK: query: select count(*)
+from (
+select
+ (case when cint % 2 = 0 then 1 else 0 end) as ceven
+from alltypesorc
+where (case when cint % 2 = 0 then 1 else 0 end) = 0 AND cint is NOT NULL) a
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
+5087
+PREHOOK: query: select count(*)
+from (
+select
+ (case when cint % 2 = 0 then 1 else 0 end) as ceven
+from alltypesorc
+where (case when cint % 2 = 0 then 1 else 0 end) = 1) a
+PREHOOK: type: QUERY
+PREHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
+POSTHOOK: query: select count(*)
+from (
+select
+ (case when cint % 2 = 0 then 1 else 0 end) as ceven
+from alltypesorc
+where (case when cint % 2 = 0 then 1 else 0 end) = 1) a
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
+4086
+PREHOOK: query: select count(*)
+from (
+select
+ (case when cint % 2 = 0 then 1 else 0 end) as ceven
+from alltypesorc
+where (case when cint % 2 = 0 then 1 else 0 end) = 1 AND cint is NOT NULL) a
+PREHOOK: type: QUERY
+PREHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
+POSTHOOK: query: select count(*)
+from (
+select
+ (case when cint % 2 = 0 then 1 else 0 end) as ceven
+from alltypesorc
+where (case when cint % 2 = 0 then 1 else 0 end) = 1 AND cint is NOT NULL) a
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
+4086
+PREHOOK: query: select count(*)
+from (
+select
+ (case when cint % 2 = 0 then 1 else 0 end) as ceven
+from alltypesorc
+where cint is null) a
+PREHOOK: type: QUERY
+PREHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
+POSTHOOK: query: select count(*)
+from (
+select
+ (case when cint % 2 = 0 then 1 else 0 end) as ceven
+from alltypesorc
+where cint is null) a
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
+3115
+PREHOOK: query: select count(*), sum(a.ceven)
+from (
+select
+ case when cint % 2 = 0 then cint else 0 end as ceven
+from alltypesorc) a
+PREHOOK: type: QUERY
+PREHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
+POSTHOOK: query: select count(*), sum(a.ceven)
+from (
+select
+ case when cint % 2 = 0 then cint else 0 end as ceven
+from alltypesorc) a
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
+12288 248718130534
+PREHOOK: query: select count(*)
+from (
+select
+ (case when cint % 2 = 0 then cint else 0 end) as ceven
+from alltypesorc
+where (case when cint % 2 = 0 then cint else 0 end) = 0) a
+PREHOOK: type: QUERY
+PREHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
+POSTHOOK: query: select count(*)
+from (
+select
+ (case when cint % 2 = 0 then cint else 0 end) as ceven
+from alltypesorc
+where (case when cint % 2 = 0 then cint else 0 end) = 0) a
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
+8202
+PREHOOK: query: select count(*)
+from (
+select
+ (case when cint % 2 = 0 then cint else 0 end) as ceven
+from alltypesorc
+where (case when cint % 2 = 0 then cint else 0 end) = 0 AND cint is NOT NULL) a
+PREHOOK: type: QUERY
+PREHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
+POSTHOOK: query: select count(*)
+from (
+select
+ (case when cint % 2 = 0 then cint else 0 end) as ceven
+from alltypesorc
+where (case when cint % 2 = 0 then cint else 0 end) = 0 AND cint is NOT NULL) a
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
+5087
+PREHOOK: query: select count(*)
+from (
+select
+ (case when cint % 2 = 0 then cint else 0 end) as ceven
+from alltypesorc
+where (case when cint % 2 = 0 then cint else 0 end) = cint) a
+PREHOOK: type: QUERY
+PREHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
+POSTHOOK: query: select count(*)
+from (
+select
+ (case when cint % 2 = 0 then cint else 0 end) as ceven
+from alltypesorc
+where (case when cint % 2 = 0 then cint else 0 end) = cint) a
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
+4086
+PREHOOK: query: select count(*)
+from (
+select
+ (case when cint % 2 = 0 then cint else 0 end) as ceven
+from alltypesorc
+where (case when cint % 2 = 0 then cint else 0 end) = cint AND cint is NOT NULL) a
+PREHOOK: type: QUERY
+PREHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
+POSTHOOK: query: select count(*)
+from (
+select
+ (case when cint % 2 = 0 then cint else 0 end) as ceven
+from alltypesorc
+where (case when cint % 2 = 0 then cint else 0 end) = cint AND cint is NOT NULL) a
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
+4086
+PREHOOK: query: select count(*)
+from (
+select
+ (case when cint % 2 = 0 then cint else 0 end) as ceven
+from alltypesorc
+where cint is null) a
+PREHOOK: type: QUERY
+PREHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
+POSTHOOK: query: select count(*)
+from (
+select
+ (case when cint % 2 = 0 then cint else 0 end) as ceven
+from alltypesorc
+where cint is null) a
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
+3115
http://git-wip-us.apache.org/repos/asf/hive/blob/a4689020/ql/src/test/results/clientpositive/tez/vectorization_div0.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/tez/vectorization_div0.q.out b/ql/src/test/results/clientpositive/tez/vectorization_div0.q.out
index af87ffe..4afe85c 100644
--- a/ql/src/test/results/clientpositive/tez/vectorization_div0.q.out
+++ b/ql/src/test/results/clientpositive/tez/vectorization_div0.q.out
@@ -291,9 +291,9 @@ from alltypesorc where cbigint > 0 and cbigint < 100000000 order by s1, s2 limit
POSTHOOK: type: QUERY
POSTHOOK: Input: default@alltypesorc
POSTHOOK: Output: hdfs://### HDFS PATH ###
--985319 NULL -0.000001217879691754650
--985319 2.0297994862577501E-4 -0.000001217879691754650
-63925 0.11256941728588189 -0.000018771998435666797
+-985319 2.0297994862577501E-4 -0.000001217879691754650
+-985319 NULL -0.000001217879691754650
0 NULL NULL
0 NULL NULL
0 NULL NULL
@@ -303,21 +303,6 @@ POSTHOOK: Output: hdfs://### HDFS PATH ###
0 NULL NULL
0 NULL NULL
0 NULL NULL
-392309 NULL 0.000003058813333367320
-673083 -0.010691103474608629 0.000001782841046349410
-2331159 NULL 0.000000514765402102559
-2342037 NULL 0.000000512374484263058
-3533105 -5.660743170667161E-5 0.000000339644590240030
-3768727 0.004139594085748318 0.000000318409903397089
-4728619 NULL 0.000000253773881972728
-5391403 NULL 0.000000222576572369010
-7022666 -0.0010246820794268159 0.000000170875277280736
-7470430 NULL 0.000000160633323650714
-8276429 NULL 0.000000144990067576246
-8286860 -8.683626850218298E-4 0.000000144807562816314
-8299981 -8.669899364829872E-4 0.000000144578644216174
-9247593 NULL 0.000000129763496295739
-9821695 -7.326637611939691E-4 0.000000122178503812224
10000738 0.001559984873116364 0.000000119991144653525
10081828 0.0015474376273826532 0.000000119026033770860
10745355 -6.696847149303117E-4 0.000000111676161466978
@@ -337,6 +322,8 @@ POSTHOOK: Output: hdfs://### HDFS PATH ###
20165679 7.736411950224934E-4 0.000000059507046601307
20547875 NULL 0.000000058400199534015
23264783 NULL 0.000000051580107151655
+2331159 NULL 0.000000514765402102559
+2342037 NULL 0.000000512374484263058
23475527 6.645644206411213E-4 0.000000051117063314489
24379905 NULL 0.000000049220864478348
24514624 -2.935390728407664E-4 0.000000048950373458716
@@ -352,12 +339,15 @@ POSTHOOK: Output: hdfs://### HDFS PATH ###
33126539 NULL 0.000000036224732079617
34603086 NULL 0.000000034678987879867
35156265 NULL 0.000000034133318769784
+3533105 -5.660743170667161E-5 0.000000339644590240030
35862260 NULL 0.000000033461360215447
36123797 -1.992038655294182E-4 0.000000033219099310075
36341671 -1.980096072082101E-4 0.000000033019945615599
36413215 -5.4925114412446145E-6 0.000000032955068647468
36578596 4.2650625518814335E-4 0.000000032806070522772
36796441 -1.955623914823719E-4 0.000000032611849607955
+3768727 0.004139594085748318 0.000000318409903397089
+392309 NULL 0.000003058813333367320
39723587 NULL 0.000000030208752296211
39985709 -1.7996429674411925E-4 0.000000030010722080731
40018606 NULL 0.000000029986051987918
@@ -370,6 +360,7 @@ POSTHOOK: Output: hdfs://### HDFS PATH ###
45717793 3.4124569399052136E-4 0.000000026247986205283
46163162 NULL 0.000000025994753132379
46525838 3.353190543284787E-4 0.000000025792120068853
+4728619 NULL 0.000000253773881972728
48626663 NULL 0.000000024677819244969
49102701 -1.465499830650864E-4 0.000000024438574163161
50300445 -1.4306036457530346E-4 0.000000023856647789100
@@ -378,6 +369,7 @@ POSTHOOK: Output: hdfs://### HDFS PATH ###
52667422 2.9621727070673783E-4 0.000000022784483356713
52962061 2.945693522010029E-4 0.000000022657728520044
53695172 NULL 0.000000022348377988248
+5391403 NULL 0.000000222576572369010
54760317 NULL 0.000000021913678841560
55020655 2.835480602693661E-4 0.000000021809991175132
56102034 NULL 0.000000021389598815615
@@ -391,6 +383,14 @@ POSTHOOK: Output: hdfs://### HDFS PATH ###
59347745 NULL 0.000000020219807846111
60229567 NULL 0.000000019923769334088
60330397 NULL 0.000000019890470801974
+673083 -0.010691103474608629 0.000001782841046349410
+7022666 -0.0010246820794268159 0.000000170875277280736
+7470430 NULL 0.000000160633323650714
+8276429 NULL 0.000000144990067576246
+8286860 -8.683626850218298E-4 0.000000144807562816314
+8299981 -8.669899364829872E-4 0.000000144578644216174
+9247593 NULL 0.000000129763496295739
+9821695 -7.326637611939691E-4 0.000000122178503812224
PREHOOK: query: explain vectorization expression
select (cdouble + 200.0) as s1, cbigint / (cdouble + 200.0) as s2, (cdouble + 200.0) / (cdouble + 200.0), cbigint / (cdouble + 200.0), 3 / (cdouble + 200.0), 1.2 / (cdouble + 200.0)
from alltypesorc where cdouble >= -500 and cdouble < -199 order by s1, s2 limit 100
@@ -508,68 +508,68 @@ from alltypesorc where cdouble >= -500 and cdouble < -199 order by s1, s2 limit
POSTHOOK: type: QUERY
POSTHOOK: Input: default@alltypesorc
POSTHOOK: Output: hdfs://### HDFS PATH ###
--292.0 NULL 1.0 NULL -0.010273972602739725 -0.00410958904109589
--290.0 NULL 1.0 NULL -0.010344827586206896 -0.004137931034482759
--289.0 NULL 1.0 NULL -0.010380622837370242 -0.004152249134948096
--281.0 NULL 1.0 NULL -0.010676156583629894 -0.004270462633451957
--279.0 NULL 1.0 NULL -0.010752688172043012 -0.004301075268817204
--274.0 6888911.518248175 1.0 6888911.518248175 -0.010948905109489052 -0.00437956204379562
--273.0 6028764.868131869 1.0 6028764.868131869 -0.01098901098901099 -0.004395604395604396
--257.0 6404096.53307393 1.0 6404096.53307393 -0.011673151750972763 -0.004669260700389105
--250.0 6583411.236 1.0 6583411.236 -0.012 -0.0048
--247.0 NULL 1.0 NULL -0.012145748987854251 -0.004858299595141701
--247.0 -7546669.174089069 1.0 -7546669.174089069 -0.012145748987854251 -0.004858299595141701
--246.0 NULL 1.0 NULL -0.012195121951219513 -0.004878048780487805
--237.0 NULL 1.0 NULL -0.012658227848101266 -0.005063291139240506
--236.0 NULL 1.0 NULL -0.012711864406779662 -0.005084745762711864
--229.0 7187130.170305677 1.0 7187130.170305677 -0.013100436681222707 -0.005240174672489083
--228.0 8278779.631578947 1.0 8278779.631578947 -0.013157894736842105 -0.005263157894736842
--225.0 NULL 1.0 NULL -0.013333333333333334 -0.005333333333333333
--210.0 -8876320.40952381 1.0 -8876320.40952381 -0.014285714285714285 -0.005714285714285714
--201.0 NULL 1.0 NULL -0.014925373134328358 -0.005970149253731343
--199.0 NULL 1.0 NULL -0.01507537688442211 -0.006030150753768844
--189.0 NULL 1.0 NULL -0.015873015873015872 -0.006349206349206349
--188.0 NULL 1.0 NULL -0.015957446808510637 -0.006382978723404255
--184.0 8944852.222826088 1.0 8944852.222826088 -0.016304347826086956 -0.006521739130434782
--183.0 8993731.196721312 1.0 8993731.196721312 -0.01639344262295082 -0.006557377049180328
--181.0 NULL 1.0 NULL -0.016574585635359115 -0.0066298342541436465
--179.0 NULL 1.0 NULL -0.01675977653631285 -0.0067039106145251395
--169.0 9738774.01775148 1.0 9738774.01775148 -0.01775147928994083 -0.007100591715976331
--164.0 NULL 1.0 NULL -0.018292682926829267 -0.007317073170731707
--161.0 NULL 1.0 NULL -0.018633540372670808 -0.007453416149068323
--154.0 1.2256894519480519E7 1.0 1.2256894519480519E7 -0.01948051948051948 -0.007792207792207792
--152.0 NULL 1.0 NULL -0.019736842105263157 -0.007894736842105263
--148.0 NULL 1.0 NULL -0.02027027027027027 -0.008108108108108109
--140.0 NULL 1.0 NULL -0.02142857142857143 -0.008571428571428572
--138.0 NULL 1.0 NULL -0.021739130434782608 -0.008695652173913044
--137.0 NULL 1.0 NULL -0.021897810218978103 -0.00875912408759124
--132.0 NULL 1.0 NULL -0.022727272727272728 -0.00909090909090909
--129.0 1.2758548906976745E7 1.0 1.2758548906976745E7 -0.023255813953488372 -0.009302325581395349
--128.0 NULL 1.0 NULL -0.0234375 -0.009375
--126.0 NULL 1.0 NULL -0.023809523809523808 -0.009523809523809523
--126.0 -1.4793867349206349E7 1.0 -1.4793867349206349E7 -0.023809523809523808 -0.009523809523809523
--116.0 NULL 1.0 NULL -0.02586206896551724 -0.010344827586206896
--113.0 NULL 1.0 NULL -0.02654867256637168 -0.010619469026548672
-113.0 -1.6495816690265486E7 1.0 -1.6495816690265486E7 -0.02654867256637168 -0.010619469026548672
--96.0 NULL 1.0 NULL -0.03125 -0.012499999999999999
--94.0 -1.9830077510638297E7 1.0 -1.9830077510638297E7 -0.031914893617021274 -0.01276595744680851
--93.0 NULL 1.0 NULL -0.03225806451612903 -0.012903225806451613
--77.0 2.4513789038961038E7 1.0 2.4513789038961038E7 -0.03896103896103896 -0.015584415584415584
--69.0 2.735596747826087E7 1.0 2.735596747826087E7 -0.043478260869565216 -0.017391304347826087
--62.0 NULL 1.0 NULL -0.04838709677419355 -0.01935483870967742
--62.0 3.0444544451612905E7 1.0 3.0444544451612905E7 -0.04838709677419355 -0.01935483870967742
--60.0 NULL 1.0 NULL -0.05 -0.02
--57.0 -3.27022330877193E7 1.0 -3.27022330877193E7 -0.05263157894736842 -0.021052631578947368
--49.0 3.35888328367347E7 1.0 3.35888328367347E7 -0.061224489795918366 -0.024489795918367346
--46.0 3.577940889130435E7 1.0 3.577940889130435E7 -0.06521739130434782 -0.02608695652173913
--38.0 4.3311916026315786E7 1.0 4.3311916026315786E7 -0.07894736842105263 -0.031578947368421054
+-113.0 NULL 1.0 NULL -0.02654867256637168 -0.010619469026548672
+-116.0 NULL 1.0 NULL -0.02586206896551724 -0.010344827586206896
+-12.0 -1.5533560716666666E8 1.0 -1.5533560716666666E8 -0.25 -0.09999999999999999
+-126.0 -1.4793867349206349E7 1.0 -1.4793867349206349E7 -0.023809523809523808 -0.009523809523809523
+-126.0 NULL 1.0 NULL -0.023809523809523808 -0.009523809523809523
+-128.0 NULL 1.0 NULL -0.0234375 -0.009375
+-129.0 1.2758548906976745E7 1.0 1.2758548906976745E7 -0.023255813953488372 -0.009302325581395349
+-132.0 NULL 1.0 NULL -0.022727272727272728 -0.00909090909090909
+-137.0 NULL 1.0 NULL -0.021897810218978103 -0.00875912408759124
+-138.0 NULL 1.0 NULL -0.021739130434782608 -0.008695652173913044
+-140.0 NULL 1.0 NULL -0.02142857142857143 -0.008571428571428572
+-148.0 NULL 1.0 NULL -0.02027027027027027 -0.008108108108108109
+-152.0 NULL 1.0 NULL -0.019736842105263157 -0.007894736842105263
+-154.0 1.2256894519480519E7 1.0 1.2256894519480519E7 -0.01948051948051948 -0.007792207792207792
+-161.0 NULL 1.0 NULL -0.018633540372670808 -0.007453416149068323
+-164.0 NULL 1.0 NULL -0.018292682926829267 -0.007317073170731707
+-169.0 9738774.01775148 1.0 9738774.01775148 -0.01775147928994083 -0.007100591715976331
+-17.0 NULL 1.0 NULL -0.17647058823529413 -0.07058823529411765
+-179.0 NULL 1.0 NULL -0.01675977653631285 -0.0067039106145251395
+-181.0 NULL 1.0 NULL -0.016574585635359115 -0.0066298342541436465
+-183.0 8993731.196721312 1.0 8993731.196721312 -0.01639344262295082 -0.006557377049180328
+-184.0 8944852.222826088 1.0 8944852.222826088 -0.016304347826086956 -0.006521739130434782
+-188.0 NULL 1.0 NULL -0.015957446808510637 -0.006382978723404255
+-189.0 NULL 1.0 NULL -0.015873015873015872 -0.006349206349206349
+-199.0 NULL 1.0 NULL -0.01507537688442211 -0.006030150753768844
+-20.0 NULL 1.0 NULL -0.15 -0.06
+-201.0 NULL 1.0 NULL -0.014925373134328358 -0.005970149253731343
+-21.0 8.988389314285715E7 1.0 8.988389314285715E7 -0.14285714285714285 -0.05714285714285714
+-210.0 -8876320.40952381 1.0 -8876320.40952381 -0.014285714285714285 -0.005714285714285714
+-225.0 NULL 1.0 NULL -0.013333333333333334 -0.005333333333333333
+-228.0 8278779.631578947 1.0 8278779.631578947 -0.013157894736842105 -0.005263157894736842
+-229.0 7187130.170305677 1.0 7187130.170305677 -0.013100436681222707 -0.005240174672489083
+-236.0 NULL 1.0 NULL -0.012711864406779662 -0.005084745762711864
+-237.0 NULL 1.0 NULL -0.012658227848101266 -0.005063291139240506
+-246.0 NULL 1.0 NULL -0.012195121951219513 -0.004878048780487805
+-247.0 -7546669.174089069 1.0 -7546669.174089069 -0.012145748987854251 -0.004858299595141701
+-247.0 NULL 1.0 NULL -0.012145748987854251 -0.004858299595141701
+-250.0 6583411.236 1.0 6583411.236 -0.012 -0.0048
+-257.0 6404096.53307393 1.0 6404096.53307393 -0.011673151750972763 -0.004669260700389105
+-273.0 6028764.868131869 1.0 6028764.868131869 -0.01098901098901099 -0.004395604395604396
+-274.0 6888911.518248175 1.0 6888911.518248175 -0.010948905109489052 -0.00437956204379562
+-279.0 NULL 1.0 NULL -0.010752688172043012 -0.004301075268817204
-28.0 5.878045746428572E7 1.0 5.878045746428572E7 -0.10714285714285714 -0.04285714285714286
-28.0 6.741291985714285E7 1.0 6.741291985714285E7 -0.10714285714285714 -0.04285714285714286
--21.0 8.988389314285715E7 1.0 8.988389314285715E7 -0.14285714285714285 -0.05714285714285714
--20.0 NULL 1.0 NULL -0.15 -0.06
--17.0 NULL 1.0 NULL -0.17647058823529413 -0.07058823529411765
--12.0 -1.5533560716666666E8 1.0 -1.5533560716666666E8 -0.25 -0.09999999999999999
+-281.0 NULL 1.0 NULL -0.010676156583629894 -0.004270462633451957
+-289.0 NULL 1.0 NULL -0.010380622837370242 -0.004152249134948096
+-290.0 NULL 1.0 NULL -0.010344827586206896 -0.004137931034482759
+-292.0 NULL 1.0 NULL -0.010273972602739725 -0.00410958904109589
-3.0 NULL 1.0 NULL -1.0 -0.39999999999999997
+-38.0 4.3311916026315786E7 1.0 4.3311916026315786E7 -0.07894736842105263 -0.031578947368421054
+-46.0 3.577940889130435E7 1.0 3.577940889130435E7 -0.06521739130434782 -0.02608695652173913
+-49.0 3.35888328367347E7 1.0 3.35888328367347E7 -0.061224489795918366 -0.024489795918367346
+-57.0 -3.27022330877193E7 1.0 -3.27022330877193E7 -0.05263157894736842 -0.021052631578947368
+-60.0 NULL 1.0 NULL -0.05 -0.02
+-62.0 3.0444544451612905E7 1.0 3.0444544451612905E7 -0.04838709677419355 -0.01935483870967742
+-62.0 NULL 1.0 NULL -0.04838709677419355 -0.01935483870967742
+-69.0 2.735596747826087E7 1.0 2.735596747826087E7 -0.043478260869565216 -0.017391304347826087
+-77.0 2.4513789038961038E7 1.0 2.4513789038961038E7 -0.03896103896103896 -0.015584415584415584
+-93.0 NULL 1.0 NULL -0.03225806451612903 -0.012903225806451613
+-94.0 -1.9830077510638297E7 1.0 -1.9830077510638297E7 -0.031914893617021274 -0.01276595744680851
+-96.0 NULL 1.0 NULL -0.03125 -0.012499999999999999
0.0 NULL NULL NULL NULL NULL
0.0 NULL NULL NULL NULL NULL
0.0 NULL NULL NULL NULL NULL
@@ -725,103 +725,103 @@ from alltypesorc where cint > 500000000 or cdouble > 1000000000 or ctinyint = 0
POSTHOOK: type: QUERY
POSTHOOK: Input: default@alltypesorc
POSTHOOK: Output: hdfs://### HDFS PATH ###
-528534767 NULL -50 NULL NULL 1.0 NULL NULL 0
-528534767 NULL 33 NULL NULL 1.0 NULL NULL 0
-528534767 NULL -28 NULL NULL 1.0 NULL NULL 0
-528534767 NULL 31 NULL NULL 1.0 NULL NULL 0
-528534767 NULL -34 NULL NULL 1.0 NULL NULL 0
-528534767 NULL 29 NULL NULL 1.0 NULL NULL 0
-528534767 NULL 31 NULL NULL 1.0 NULL NULL 0
-528534767 NULL NULL NULL NULL NULL NULL NULL NULL
+528534767 NULL -1 NULL NULL 1.0 NULL NULL 0
528534767 NULL -11 NULL NULL 1.0 NULL NULL 0
-528534767 NULL 61 NULL NULL 1.0 NULL NULL 0
-528534767 NULL 16 NULL NULL 1.0 NULL NULL 0
-528534767 NULL 62 NULL NULL 1.0 NULL NULL 0
-528534767 NULL -23 NULL NULL 1.0 NULL NULL 0
-528534767 NULL -51 NULL NULL 1.0 NULL NULL 0
528534767 NULL -11 NULL NULL 1.0 NULL NULL 0
-528534767 NULL -48 NULL NULL 1.0 NULL NULL 0
-528534767 NULL -62 NULL NULL 1.0 NULL NULL 0
-528534767 NULL -45 NULL NULL 1.0 NULL NULL 0
-528534767 NULL 40 NULL NULL 1.0 NULL NULL 0
-528534767 NULL 39 NULL NULL 1.0 NULL NULL 0
-528534767 NULL -32 NULL NULL 1.0 NULL NULL 0
-528534767 NULL -56 NULL NULL 1.0 NULL NULL 0
-528534767 NULL -7 NULL NULL 1.0 NULL NULL 0
-528534767 NULL 24 NULL NULL 1.0 NULL NULL 0
-528534767 NULL 36 NULL NULL 1.0 NULL NULL 0
-528534767 NULL -23 NULL NULL 1.0 NULL NULL 0
-528534767 NULL -55 NULL NULL 1.0 NULL NULL 0
528534767 NULL -11 NULL NULL 1.0 NULL NULL 0
-528534767 NULL 51 NULL NULL 1.0 NULL NULL 0
-528534767 NULL -24 NULL NULL 1.0 NULL NULL 0
-528534767 NULL -44 NULL NULL 1.0 NULL NULL 0
-NULL 1018195815 0 NULL NULL NULL NULL NULL NULL
-528534767 NULL 24 NULL NULL 1.0 NULL NULL 0
-528534767 NULL 4 NULL NULL 1.0 NULL NULL 0
-528534767 NULL -57 NULL NULL 1.0 NULL NULL 0
-528534767 NULL -22 NULL NULL 1.0 NULL NULL 0
-528534767 NULL 28 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -12 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -13 NULL NULL 1.0 NULL NULL 0
528534767 NULL -16 NULL NULL 1.0 NULL NULL 0
-528534767 NULL 46 NULL NULL 1.0 NULL NULL 0
-528534767 NULL 29 NULL NULL 1.0 NULL NULL 0
-528534767 NULL -56 NULL NULL 1.0 NULL NULL 0
528534767 NULL -16 NULL NULL 1.0 NULL NULL 0
-528534767 NULL 38 NULL NULL 1.0 NULL NULL 0
-528534767 NULL -54 NULL NULL 1.0 NULL NULL 0
-528534767 NULL -23 NULL NULL 1.0 NULL NULL 0
528534767 NULL -19 NULL NULL 1.0 NULL NULL 0
-528534767 NULL 40 NULL NULL 1.0 NULL NULL 0
-528534767 NULL 53 NULL NULL 1.0 NULL NULL 0
-528534767 NULL -34 NULL NULL 1.0 NULL NULL 0
-528534767 NULL 5 NULL NULL 1.0 NULL NULL 0
-528534767 NULL 51 NULL NULL 1.0 NULL NULL 0
-528534767 NULL -4 NULL NULL 1.0 NULL NULL 0
-528534767 NULL 61 NULL NULL 1.0 NULL NULL 0
-528534767 NULL 19 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -21 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -21 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -22 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -22 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -22 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -23 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -23 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -23 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -24 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -28 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -28 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -30 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -32 NULL NULL 1.0 NULL NULL 0
528534767 NULL -33 NULL NULL 1.0 NULL NULL 0
-528534767 NULL 53 NULL NULL 1.0 NULL NULL 0
-528534767 NULL 18 NULL NULL 1.0 NULL NULL 0
-528534767 NULL 30 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -33 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -34 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -34 NULL NULL 1.0 NULL NULL 0
528534767 NULL -36 NULL NULL 1.0 NULL NULL 0
-528534767 NULL 34 NULL NULL 1.0 NULL NULL 0
-528534767 NULL -55 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -37 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -4 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -4 NULL NULL 1.0 NULL NULL 0
528534767 NULL -40 NULL NULL 1.0 NULL NULL 0
-528534767 NULL 21 NULL NULL 1.0 NULL NULL 0
-528534767 NULL 61 NULL NULL 1.0 NULL NULL 0
-528534767 NULL -59 NULL NULL 1.0 NULL NULL 0
-528534767 NULL 0 NULL NULL NULL NULL NULL NULL
-528534767 NULL -21 NULL NULL 1.0 NULL NULL 0
-528534767 NULL -33 NULL NULL 1.0 NULL NULL 0
-528534767 NULL -30 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -43 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -44 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -45 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -45 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -47 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -48 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -48 NULL NULL 1.0 NULL NULL 0
528534767 NULL -5 NULL NULL 1.0 NULL NULL 0
-528534767 NULL -53 NULL NULL 1.0 NULL NULL 0
-528534767 NULL 34 NULL NULL 1.0 NULL NULL 0
528534767 NULL -5 NULL NULL 1.0 NULL NULL 0
-528534767 NULL 27 NULL NULL 1.0 NULL NULL 0
-528534767 NULL NULL NULL NULL NULL NULL NULL NULL
-528534767 NULL -21 NULL NULL 1.0 NULL NULL 0
-528534767 NULL 43 NULL NULL 1.0 NULL NULL 0
-528534767 NULL 41 NULL NULL 1.0 NULL NULL 0
-528534767 NULL -28 NULL NULL 1.0 NULL NULL 0
528534767 NULL -5 NULL NULL 1.0 NULL NULL 0
-528534767 NULL 13 NULL NULL 1.0 NULL NULL 0
-528534767 NULL -45 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -50 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -51 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -53 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -54 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -55 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -55 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -56 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -56 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -57 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -59 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -62 NULL NULL 1.0 NULL NULL 0
+528534767 NULL -7 NULL NULL 1.0 NULL NULL 0
+528534767 NULL 0 NULL NULL NULL NULL NULL NULL
+528534767 NULL 0 NULL NULL NULL NULL NULL NULL
528534767 NULL 10 NULL NULL 1.0 NULL NULL 0
-528534767 NULL -22 NULL NULL 1.0 NULL NULL 0
-528534767 NULL 38 NULL NULL 1.0 NULL NULL 0
-528534767 NULL -48 NULL NULL 1.0 NULL NULL 0
+528534767 NULL 13 NULL NULL 1.0 NULL NULL 0
+528534767 NULL 16 NULL NULL 1.0 NULL NULL 0
+528534767 NULL 18 NULL NULL 1.0 NULL NULL 0
+528534767 NULL 19 NULL NULL 1.0 NULL NULL 0
528534767 NULL 2 NULL NULL 1.0 NULL NULL 0
-528534767 NULL -37 NULL NULL 1.0 NULL NULL 0
-528534767 NULL -43 NULL NULL 1.0 NULL NULL 0
-528534767 NULL 36 NULL NULL 1.0 NULL NULL 0
-528534767 NULL -1 NULL NULL 1.0 NULL NULL 0
-528534767 NULL -12 NULL NULL 1.0 NULL NULL 0
-528534767 NULL 0 NULL NULL NULL NULL NULL NULL
+528534767 NULL 21 NULL NULL 1.0 NULL NULL 0
+528534767 NULL 24 NULL NULL 1.0 NULL NULL 0
+528534767 NULL 24 NULL NULL 1.0 NULL NULL 0
528534767 NULL 26 NULL NULL 1.0 NULL NULL 0
-528534767 NULL -22 NULL NULL 1.0 NULL NULL 0
-528534767 NULL 9 NULL NULL 1.0 NULL NULL 0
-528534767 NULL -13 NULL NULL 1.0 NULL NULL 0
+528534767 NULL 27 NULL NULL 1.0 NULL NULL 0
+528534767 NULL 28 NULL NULL 1.0 NULL NULL 0
+528534767 NULL 29 NULL NULL 1.0 NULL NULL 0
+528534767 NULL 29 NULL NULL 1.0 NULL NULL 0
+528534767 NULL 30 NULL NULL 1.0 NULL NULL 0
+528534767 NULL 31 NULL NULL 1.0 NULL NULL 0
+528534767 NULL 31 NULL NULL 1.0 NULL NULL 0
+528534767 NULL 33 NULL NULL 1.0 NULL NULL 0
+528534767 NULL 34 NULL NULL 1.0 NULL NULL 0
+528534767 NULL 34 NULL NULL 1.0 NULL NULL 0
+528534767 NULL 36 NULL NULL 1.0 NULL NULL 0
+528534767 NULL 36 NULL NULL 1.0 NULL NULL 0
528534767 NULL 38 NULL NULL 1.0 NULL NULL 0
-528534767 NULL -4 NULL NULL 1.0 NULL NULL 0
-528534767 NULL -47 NULL NULL 1.0 NULL NULL 0
+528534767 NULL 38 NULL NULL 1.0 NULL NULL 0
+528534767 NULL 38 NULL NULL 1.0 NULL NULL 0
+528534767 NULL 39 NULL NULL 1.0 NULL NULL 0
+528534767 NULL 4 NULL NULL 1.0 NULL NULL 0
+528534767 NULL 40 NULL NULL 1.0 NULL NULL 0
+528534767 NULL 40 NULL NULL 1.0 NULL NULL 0
+528534767 NULL 41 NULL NULL 1.0 NULL NULL 0
+528534767 NULL 43 NULL NULL 1.0 NULL NULL 0
+528534767 NULL 46 NULL NULL 1.0 NULL NULL 0
+528534767 NULL 5 NULL NULL 1.0 NULL NULL 0
+528534767 NULL 51 NULL NULL 1.0 NULL NULL 0
+528534767 NULL 51 NULL NULL 1.0 NULL NULL 0
+528534767 NULL 53 NULL NULL 1.0 NULL NULL 0
+528534767 NULL 53 NULL NULL 1.0 NULL NULL 0
+528534767 NULL 61 NULL NULL 1.0 NULL NULL 0
+528534767 NULL 61 NULL NULL 1.0 NULL NULL 0
+528534767 NULL 61 NULL NULL 1.0 NULL NULL 0
+528534767 NULL 62 NULL NULL 1.0 NULL NULL 0
+528534767 NULL 9 NULL NULL 1.0 NULL NULL 0
+528534767 NULL NULL NULL NULL NULL NULL NULL NULL
+528534767 NULL NULL NULL NULL NULL NULL NULL NULL
+NULL 1018195815 0 NULL NULL NULL NULL NULL NULL
http://git-wip-us.apache.org/repos/asf/hive/blob/a4689020/ql/src/test/results/clientpositive/vector_between_columns.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/vector_between_columns.q.out b/ql/src/test/results/clientpositive/vector_between_columns.q.out
index c65ef71..7967df1 100644
--- a/ql/src/test/results/clientpositive/vector_between_columns.q.out
+++ b/ql/src/test/results/clientpositive/vector_between_columns.q.out
@@ -47,6 +47,17 @@ POSTHOOK: Output: default@TSINT
POSTHOOK: Lineage: tsint.csint SIMPLE [(tsint_txt)tsint_txt.FieldSchema(name:csint, type:smallint, comment:null), ]
POSTHOOK: Lineage: tsint.rnum SIMPLE [(tsint_txt)tsint_txt.FieldSchema(name:rnum, type:int, comment:null), ]
tsint_txt.rnum tsint_txt.csint
+PREHOOK: query: insert into TSINT values (NULL, NULL)
+PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
+PREHOOK: Output: default@tsint
+POSTHOOK: query: insert into TSINT values (NULL, NULL)
+POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
+POSTHOOK: Output: default@tsint
+POSTHOOK: Lineage: tsint.csint EXPRESSION []
+POSTHOOK: Lineage: tsint.rnum EXPRESSION []
+_col0 _col1
PREHOOK: query: create table TINT stored as orc AS SELECT * FROM TINT_txt
PREHOOK: type: CREATETABLE_AS_SELECT
PREHOOK: Input: default@tint_txt
@@ -60,6 +71,17 @@ POSTHOOK: Output: default@TINT
POSTHOOK: Lineage: tint.cint SIMPLE [(tint_txt)tint_txt.FieldSchema(name:cint, type:int, comment:null), ]
POSTHOOK: Lineage: tint.rnum SIMPLE [(tint_txt)tint_txt.FieldSchema(name:rnum, type:int, comment:null), ]
tint_txt.rnum tint_txt.cint
+PREHOOK: query: insert into TINT values (NULL, NULL)
+PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
+PREHOOK: Output: default@tint
+POSTHOOK: query: insert into TINT values (NULL, NULL)
+POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
+POSTHOOK: Output: default@tint
+POSTHOOK: Lineage: tint.cint EXPRESSION []
+POSTHOOK: Lineage: tint.rnum EXPRESSION []
+_col0 _col1
Warning: Map Join MAPJOIN[9][bigTable=?] in task 'Stage-3:MAPRED' is a cross product
PREHOOK: query: explain vectorization expression
select tint.rnum, tsint.rnum, tint.cint, tsint.csint, (case when (tint.cint between tsint.csint and tsint.csint) then "Ok" else "NoOk" end) as between_col from tint , tsint
@@ -88,11 +110,11 @@ STAGE PLANS:
$hdt$_0:tint
TableScan
alias: tint
- Statistics: Num rows: 5 Data size: 36 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 6 Data size: 36 Basic stats: COMPLETE Column stats: NONE
Select Operator
expressions: rnum (type: int), cint (type: int)
outputColumnNames: _col0, _col1
- Statistics: Num rows: 5 Data size: 36 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 6 Data size: 36 Basic stats: COMPLETE Column stats: NONE
HashTable Sink Operator
keys:
0
@@ -103,7 +125,7 @@ STAGE PLANS:
Map Operator Tree:
TableScan
alias: tsint
- Statistics: Num rows: 5 Data size: 36 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 6 Data size: 36 Basic stats: COMPLETE Column stats: NONE
TableScan Vectorization:
native: true
Select Operator
@@ -113,7 +135,7 @@ STAGE PLANS:
className: VectorSelectOperator
native: true
projectedOutputColumnNums: [0, 1]
- Statistics: Num rows: 5 Data size: 36 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 6 Data size: 36 Basic stats: COMPLETE Column stats: NONE
Map Join Operator
condition map:
Inner Join 0 to 1
@@ -127,7 +149,7 @@ STAGE PLANS:
nativeConditionsMet: hive.mapjoin.optimized.hashtable IS true, hive.vectorized.execution.mapjoin.native.enabled IS true, One MapJoin Condition IS true, No nullsafe IS true, Small table vectorizes IS true, Optimized Table and Supports Key Types IS true
nativeConditionsNotMet: hive.execution.engine mr IN [tez, spark] IS false
outputColumnNames: _col0, _col1, _col2, _col3
- Statistics: Num rows: 25 Data size: 385 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 36 Data size: 468 Basic stats: COMPLETE Column stats: NONE
Select Operator
expressions: _col0 (type: int), _col2 (type: int), _col1 (type: int), _col3 (type: smallint), CASE WHEN (_col1 BETWEEN UDFToInteger(_col3) AND UDFToInteger(_col3)) THEN ('Ok') ELSE ('NoOk') END (type: string)
outputColumnNames: _col0, _col1, _col2, _col3, _col4
@@ -136,13 +158,13 @@ STAGE PLANS:
native: true
projectedOutputColumnNums: [0, 2, 1, 3, 5]
selectExpressions: IfExprStringScalarStringScalar(col 4:boolean, val Ok, val NoOk)(children: VectorUDFAdaptor(_col1 BETWEEN UDFToInteger(_col3) AND UDFToInteger(_col3))(children: col 3:smallint, col 3:smallint) -> 4:boolean) -> 5:string
- Statistics: Num rows: 25 Data size: 385 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 36 Data size: 468 Basic stats: COMPLETE Column stats: NONE
File Output Operator
compressed: false
File Sink Vectorization:
className: VectorFileSinkOperator
native: false
- Statistics: Num rows: 25 Data size: 385 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 36 Data size: 468 Basic stats: COMPLETE Column stats: NONE
table:
input format: org.apache.hadoop.mapred.SequenceFileInputFormat
output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -183,26 +205,37 @@ tint.rnum tsint.rnum tint.cint tsint.csint between_col
0 2 NULL 0 NoOk
0 3 NULL 1 NoOk
0 4 NULL 10 NoOk
+0 NULL NULL NULL NoOk
1 0 -1 NULL NoOk
1 1 -1 -1 Ok
1 2 -1 0 NoOk
1 3 -1 1 NoOk
1 4 -1 10 NoOk
+1 NULL -1 NULL NoOk
2 0 0 NULL NoOk
2 1 0 -1 NoOk
2 2 0 0 Ok
2 3 0 1 NoOk
2 4 0 10 NoOk
+2 NULL 0 NULL NoOk
3 0 1 NULL NoOk
3 1 1 -1 NoOk
3 2 1 0 NoOk
3 3 1 1 Ok
3 4 1 10 NoOk
+3 NULL 1 NULL NoOk
4 0 10 NULL NoOk
4 1 10 -1 NoOk
4 2 10 0 NoOk
4 3 10 1 NoOk
4 4 10 10 Ok
+4 NULL 10 NULL NoOk
+NULL 0 NULL NULL NoOk
+NULL 1 NULL -1 NoOk
+NULL 2 NULL 0 NoOk
+NULL 3 NULL 1 NoOk
+NULL 4 NULL 10 NoOk
+NULL NULL NULL NULL NoOk
Warning: Map Join MAPJOIN[10][bigTable=?] in task 'Stage-3:MAPRED' is a cross product
PREHOOK: query: explain vectorization expression
select tint.rnum, tsint.rnum, tint.cint, tsint.csint from tint , tsint where tint.cint between tsint.csint and tsint.csint
@@ -231,11 +264,11 @@ STAGE PLANS:
$hdt$_0:tint
TableScan
alias: tint
- Statistics: Num rows: 5 Data size: 36 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 6 Data size: 36 Basic stats: COMPLETE Column stats: NONE
Select Operator
expressions: rnum (type: int), cint (type: int)
outputColumnNames: _col0, _col1
- Statistics: Num rows: 5 Data size: 36 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 6 Data size: 36 Basic stats: COMPLETE Column stats: NONE
HashTable Sink Operator
keys:
0
@@ -246,7 +279,7 @@ STAGE PLANS:
Map Operator Tree:
TableScan
alias: tsint
- Statistics: Num rows: 5 Data size: 36 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 6 Data size: 36 Basic stats: COMPLETE Column stats: NONE
TableScan Vectorization:
native: true
Select Operator
@@ -256,7 +289,7 @@ STAGE PLANS:
className: VectorSelectOperator
native: true
projectedOutputColumnNums: [0, 1]
- Statistics: Num rows: 5 Data size: 36 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 6 Data size: 36 Basic stats: COMPLETE Column stats: NONE
Map Join Operator
condition map:
Inner Join 0 to 1
@@ -270,14 +303,14 @@ STAGE PLANS:
nativeConditionsMet: hive.mapjoin.optimized.hashtable IS true, hive.vectorized.execution.mapjoin.native.enabled IS true, One MapJoin Condition IS true, No nullsafe IS true, Small table vectorizes IS true, Optimized Table and Supports Key Types IS true
nativeConditionsNotMet: hive.execution.engine mr IN [tez, spark] IS false
outputColumnNames: _col0, _col1, _col2, _col3
- Statistics: Num rows: 25 Data size: 385 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 36 Data size: 468 Basic stats: COMPLETE Column stats: NONE
Filter Operator
Filter Vectorization:
className: VectorFilterOperator
native: true
predicateExpression: SelectColumnIsTrue(col 4:boolean)(children: VectorUDFAdaptor(_col1 BETWEEN UDFToInteger(_col3) AND UDFToInteger(_col3))(children: col 3:smallint, col 3:smallint) -> 4:boolean)
predicate: _col1 BETWEEN UDFToInteger(_col3) AND UDFToInteger(_col3) (type: boolean)
- Statistics: Num rows: 2 Data size: 30 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 4 Data size: 52 Basic stats: COMPLETE Column stats: NONE
Select Operator
expressions: _col0 (type: int), _col2 (type: int), _col1 (type: int), _col3 (type: smallint)
outputColumnNames: _col0, _col1, _col2, _col3
@@ -285,13 +318,13 @@ STAGE PLANS:
className: VectorSelectOperator
native: true
projectedOutputColumnNums: [0, 2, 1, 3]
- Statistics: Num rows: 2 Data size: 30 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 4 Data size: 52 Basic stats: COMPLETE Column stats: NONE
File Output Operator
compressed: false
File Sink Vectorization:
className: VectorFileSinkOperator
native: false
- Statistics: Num rows: 2 Data size: 30 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 4 Data size: 52 Basic stats: COMPLETE Column stats: NONE
table:
input format: org.apache.hadoop.mapred.SequenceFileInputFormat
output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
http://git-wip-us.apache.org/repos/asf/hive/blob/a4689020/ql/src/test/results/clientpositive/vector_bround.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/vector_bround.q.out b/ql/src/test/results/clientpositive/vector_bround.q.out
index a2b745a..57fb16f 100644
--- a/ql/src/test/results/clientpositive/vector_bround.q.out
+++ b/ql/src/test/results/clientpositive/vector_bround.q.out
@@ -34,6 +34,16 @@ POSTHOOK: Input: _dummy_database@_dummy_table
POSTHOOK: Output: default@test_vector_bround
POSTHOOK: Lineage: test_vector_bround.v0 SCRIPT []
POSTHOOK: Lineage: test_vector_bround.v1 SCRIPT []
+PREHOOK: query: insert into test_vector_bround values (NULL, NULL)
+PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
+PREHOOK: Output: default@test_vector_bround
+POSTHOOK: query: insert into test_vector_bround values (NULL, NULL)
+POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
+POSTHOOK: Output: default@test_vector_bround
+POSTHOOK: Lineage: test_vector_bround.v0 EXPRESSION []
+POSTHOOK: Lineage: test_vector_bround.v1 EXPRESSION []
PREHOOK: query: explain vectorization detail
select bround(v0), bround(v1, 1) from test_vector_bround
PREHOOK: type: QUERY
@@ -54,7 +64,7 @@ STAGE PLANS:
Map Operator Tree:
TableScan
alias: test_vector_bround
- Statistics: Num rows: 8 Data size: 128 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 9 Data size: 128 Basic stats: COMPLETE Column stats: NONE
TableScan Vectorization:
native: true
vectorizationSchemaColumns: [0:v0:double, 1:v1:double, 2:ROW__ID:struct<transactionid:bigint,bucketid:int,rowid:bigint>]
@@ -66,13 +76,13 @@ STAGE PLANS:
native: true
projectedOutputColumnNums: [3, 4]
selectExpressions: FuncBRoundDoubleToDouble(col 0:double) -> 3:double, BRoundWithNumDigitsDoubleToDouble(col 1, decimalPlaces 1) -> 4:double
- Statistics: Num rows: 8 Data size: 128 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 9 Data size: 128 Basic stats: COMPLETE Column stats: NONE
File Output Operator
compressed: false
File Sink Vectorization:
className: VectorFileSinkOperator
native: false
- Statistics: Num rows: 8 Data size: 128 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 9 Data size: 128 Basic stats: COMPLETE Column stats: NONE
table:
input format: org.apache.hadoop.mapred.SequenceFileInputFormat
output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -116,3 +126,4 @@ POSTHOOK: Input: default@test_vector_bround
3.0 1.3
3.0 1.3
4.0 1.4
+NULL NULL
http://git-wip-us.apache.org/repos/asf/hive/blob/a4689020/ql/src/test/results/clientpositive/vector_char_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/vector_char_2.q.out b/ql/src/test/results/clientpositive/vector_char_2.q.out
index ea0ddff..b38cbe7 100644
--- a/ql/src/test/results/clientpositive/vector_char_2.q.out
+++ b/ql/src/test/results/clientpositive/vector_char_2.q.out
@@ -26,6 +26,16 @@ POSTHOOK: Input: default@src
POSTHOOK: Output: default@char_2
POSTHOOK: Lineage: char_2.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
POSTHOOK: Lineage: char_2.value EXPRESSION [(src)src.FieldSchema(name:value, type:string, comment:default), ]
+PREHOOK: query: insert into char_2 values (NULL, NULL)
+PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
+PREHOOK: Output: default@char_2
+POSTHOOK: query: insert into char_2 values (NULL, NULL)
+POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
+POSTHOOK: Output: default@char_2
+POSTHOOK: Lineage: char_2.key EXPRESSION []
+POSTHOOK: Lineage: char_2.value EXPRESSION []
PREHOOK: query: select value, sum(cast(key as int)), count(*) numrows
from src
group by value
@@ -74,7 +84,7 @@ STAGE PLANS:
Map Operator Tree:
TableScan
alias: char_2
- Statistics: Num rows: 500 Data size: 99000 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 501 Data size: 99168 Basic stats: COMPLETE Column stats: NONE
TableScan Vectorization:
native: true
Select Operator
@@ -85,7 +95,7 @@ STAGE PLANS:
native: true
projectedOutputColumnNums: [1, 3]
selectExpressions: CastStringToLong(col 0:char(10)) -> 3:int
- Statistics: Num rows: 500 Data size: 99000 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 501 Data size: 99168 Basic stats: COMPLETE Column stats: NONE
Group By Operator
aggregations: sum(_col1), count()
Group By Vectorization:
@@ -99,7 +109,7 @@ STAGE PLANS:
keys: _col0 (type: char(20))
mode: hash
outputColumnNames: _col0, _col1, _col2
- Statistics: Num rows: 500 Data size: 99000 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 501 Data size: 99168 Basic stats: COMPLETE Column stats: NONE
Reduce Output Operator
key expressions: _col0 (type: char(20))
sort order: +
@@ -109,7 +119,7 @@ STAGE PLANS:
native: false
nativeConditionsMet: hive.vectorized.execution.reducesink.new.enabled IS true, No PTF TopN IS true, No DISTINCT columns IS true, BinarySortableSerDe for keys IS true, LazyBinarySerDe for values IS true
nativeConditionsNotMet: hive.execution.engine mr IN [tez, spark] IS false
- Statistics: Num rows: 500 Data size: 99000 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 501 Data size: 99168 Basic stats: COMPLETE Column stats: NONE
TopN Hash Memory Usage: 0.1
value expressions: _col1 (type: bigint), _col2 (type: bigint)
Execution mode: vectorized
@@ -132,7 +142,7 @@ STAGE PLANS:
keys: KEY._col0 (type: char(20))
mode: mergepartial
outputColumnNames: _col0, _col1, _col2
- Statistics: Num rows: 250 Data size: 49500 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 250 Data size: 49485 Basic stats: COMPLETE Column stats: NONE
File Output Operator
compressed: false
table:
@@ -154,7 +164,7 @@ STAGE PLANS:
native: false
nativeConditionsMet: hive.vectorized.execution.reducesink.new.enabled IS true, No PTF TopN IS true, No DISTINCT columns IS true, BinarySortableSerDe for keys IS true, LazyBinarySerDe for values IS true
nativeConditionsNotMet: hive.execution.engine mr IN [tez, spark] IS false
- Statistics: Num rows: 250 Data size: 49500 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 250 Data size: 49485 Basic stats: COMPLETE Column stats: NONE
TopN Hash Memory Usage: 0.1
value expressions: _col1 (type: bigint), _col2 (type: bigint)
Execution mode: vectorized
@@ -175,13 +185,13 @@ STAGE PLANS:
Select Operator
expressions: KEY.reducesinkkey0 (type: char(20)), VALUE._col0 (type: bigint), VALUE._col1 (type: bigint)
outputColumnNames: _col0, _col1, _col2
- Statistics: Num rows: 250 Data size: 49500 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 250 Data size: 49485 Basic stats: COMPLETE Column stats: NONE
Limit
Number of rows: 5
- Statistics: Num rows: 5 Data size: 990 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 5 Data size: 985 Basic stats: COMPLETE Column stats: NONE
File Output Operator
compressed: false
- Statistics: Num rows: 5 Data size: 990 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 5 Data size: 985 Basic stats: COMPLETE Column stats: NONE
table:
input format: org.apache.hadoop.mapred.SequenceFileInputFormat
output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -209,11 +219,11 @@ limit 5
POSTHOOK: type: QUERY
POSTHOOK: Input: default@char_2
#### A masked pattern was here ####
+NULL NULL 1
val_0 0 3
val_10 10 1
val_100 200 2
val_103 206 2
-val_104 208 2
PREHOOK: query: select value, sum(cast(key as int)), count(*) numrows
from src
group by value
@@ -262,7 +272,7 @@ STAGE PLANS:
Map Operator Tree:
TableScan
alias: char_2
- Statistics: Num rows: 500 Data size: 99000 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 501 Data size: 99168 Basic stats: COMPLETE Column stats: NONE
TableScan Vectorization:
native: true
Select Operator
@@ -273,7 +283,7 @@ STAGE PLANS:
native: true
projectedOutputColumnNums: [1, 3]
selectExpressions: CastStringToLong(col 0:char(10)) -> 3:int
- Statistics: Num rows: 500 Data size: 99000 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 501 Data size: 99168 Basic stats: COMPLETE Column stats: NONE
Group By Operator
aggregations: sum(_col1), count()
Group By Vectorization:
@@ -287,7 +297,7 @@ STAGE PLANS:
keys: _col0 (type: char(20))
mode: hash
outputColumnNames: _col0, _col1, _col2
- Statistics: Num rows: 500 Data size: 99000 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 501 Data size: 99168 Basic stats: COMPLETE Column stats: NONE
Reduce Output Operator
key expressions: _col0 (type: char(20))
sort order: -
@@ -297,7 +307,7 @@ STAGE PLANS:
native: false
nativeConditionsMet: hive.vectorized.execution.reducesink.new.enabled IS true, No PTF TopN IS true, No DISTINCT columns IS true, BinarySortableSerDe for keys IS true, LazyBinarySerDe for values IS true
nativeConditionsNotMet: hive.execution.engine mr IN [tez, spark] IS false
- Statistics: Num rows: 500 Data size: 99000 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 501 Data size: 99168 Basic stats: COMPLETE Column stats: NONE
TopN Hash Memory Usage: 0.1
value expressions: _col1 (type: bigint), _col2 (type: bigint)
Execution mode: vectorized
@@ -320,7 +330,7 @@ STAGE PLANS:
keys: KEY._col0 (type: char(20))
mode: mergepartial
outputColumnNames: _col0, _col1, _col2
- Statistics: Num rows: 250 Data size: 49500 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 250 Data size: 49485 Basic stats: COMPLETE Column stats: NONE
File Output Operator
compressed: false
table:
@@ -342,7 +352,7 @@ STAGE PLANS:
native: false
nativeConditionsMet: hive.vectorized.execution.reducesink.new.enabled IS true, No PTF TopN IS true, No DISTINCT columns IS true, BinarySortableSerDe for keys IS true, LazyBinarySerDe for values IS true
nativeConditionsNotMet: hive.execution.engine mr IN [tez, spark] IS false
- Statistics: Num rows: 250 Data size: 49500 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 250 Data size: 49485 Basic stats: COMPLETE Column stats: NONE
TopN Hash Memory Usage: 0.1
value expressions: _col1 (type: bigint), _col2 (type: bigint)
Execution mode: vectorized
@@ -363,13 +373,13 @@ STAGE PLANS:
Select Operator
expressions: KEY.reducesinkkey0 (type: char(20)), VALUE._col0 (type: bigint), VALUE._col1 (type: bigint)
outputColumnNames: _col0, _col1, _col2
- Statistics: Num rows: 250 Data size: 49500 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 250 Data size: 49485 Basic stats: COMPLETE Column stats: NONE
Limit
Number of rows: 5
- Statistics: Num rows: 5 Data size: 990 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 5 Data size: 985 Basic stats: COMPLETE Column stats: NONE
File Output Operator
compressed: false
- Statistics: Num rows: 5 Data size: 990 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 5 Data size: 985 Basic stats: COMPLETE Column stats: NONE
table:
input format: org.apache.hadoop.mapred.SequenceFileInputFormat
output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
http://git-wip-us.apache.org/repos/asf/hive/blob/a4689020/ql/src/test/results/clientpositive/vector_coalesce_2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/vector_coalesce_2.q.out b/ql/src/test/results/clientpositive/vector_coalesce_2.q.out
index a5a7915..ca06456 100644
--- a/ql/src/test/results/clientpositive/vector_coalesce_2.q.out
+++ b/ql/src/test/results/clientpositive/vector_coalesce_2.q.out
@@ -16,6 +16,16 @@ POSTHOOK: Input: _dummy_database@_dummy_table
POSTHOOK: Output: default@str_str_orc
POSTHOOK: Lineage: str_str_orc.str1 SCRIPT []
POSTHOOK: Lineage: str_str_orc.str2 SCRIPT []
+PREHOOK: query: insert into str_str_orc values (NULL, NULL)
+PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
+PREHOOK: Output: default@str_str_orc
+POSTHOOK: query: insert into str_str_orc values (NULL, NULL)
+POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
+POSTHOOK: Output: default@str_str_orc
+POSTHOOK: Lineage: str_str_orc.str1 EXPRESSION []
+POSTHOOK: Lineage: str_str_orc.str2 EXPRESSION []
PREHOOK: query: EXPLAIN VECTORIZATION EXPRESSION
SELECT
str2, ROUND(sum(cast(COALESCE(str1, 0) as int))/60, 2) as result
@@ -29,8 +39,8 @@ from str_str_orc
GROUP BY str2
POSTHOOK: type: QUERY
PLAN VECTORIZATION:
- enabled: false
- enabledConditionsNotMet: [hive.vectorized.execution.enabled IS false]
+ enabled: true
+ enabledConditionsMet: [hive.vectorized.execution.enabled IS true]
STAGE DEPENDENCIES:
Stage-1 is a root stage
@@ -42,37 +52,71 @@ STAGE PLANS:
Map Operator Tree:
TableScan
alias: str_str_orc
- Statistics: Num rows: 4 Data size: 510 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 5 Data size: 678 Basic stats: COMPLETE Column stats: NONE
+ TableScan Vectorization:
+ native: true
Select Operator
expressions: str2 (type: string), UDFToInteger(COALESCE(str1,0)) (type: int)
outputColumnNames: _col0, _col1
- Statistics: Num rows: 4 Data size: 510 Basic stats: COMPLETE Column stats: NONE
+ Select Vectorization:
+ className: VectorSelectOperator
+ native: true
+ projectedOutputColumnNums: [1, 5]
+ selectExpressions: CastStringToLong(col 4:string)(children: VectorCoalesce(columns [0, 3])(children: col 0:string, ConstantVectorExpression(val 0) -> 3:string) -> 4:string) -> 5:int
+ Statistics: Num rows: 5 Data size: 678 Basic stats: COMPLETE Column stats: NONE
Group By Operator
aggregations: sum(_col1)
+ Group By Vectorization:
+ aggregators: VectorUDAFSumLong(col 5:int) -> bigint
+ className: VectorGroupByOperator
+ groupByMode: HASH
+ keyExpressions: col 1:string
+ native: false
+ vectorProcessingMode: HASH
+ projectedOutputColumnNums: [0]
keys: _col0 (type: string)
mode: hash
outputColumnNames: _col0, _col1
- Statistics: Num rows: 4 Data size: 510 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 5 Data size: 678 Basic stats: COMPLETE Column stats: NONE
Reduce Output Operator
key expressions: _col0 (type: string)
sort order: +
Map-reduce partition columns: _col0 (type: string)
- Statistics: Num rows: 4 Data size: 510 Basic stats: COMPLETE Column stats: NONE
+ Reduce Sink Vectorization:
+ className: VectorReduceSinkOperator
+ native: false
+ nativeConditionsMet: hive.vectorized.execution.reducesink.new.enabled IS true, No PTF TopN IS true, No DISTINCT columns IS true, BinarySortableSerDe for keys IS true, LazyBinarySerDe for values IS true
+ nativeConditionsNotMet: hive.execution.engine mr IN [tez, spark] IS false
+ Statistics: Num rows: 5 Data size: 678 Basic stats: COMPLETE Column stats: NONE
value expressions: _col1 (type: bigint)
+ Execution mode: vectorized
+ Map Vectorization:
+ enabled: true
+ enabledConditionsMet: hive.vectorized.use.vectorized.input.format IS true
+ inputFormatFeatureSupport: []
+ featureSupportInUse: []
+ inputFileFormats: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
+ allNative: false
+ usesVectorUDFAdaptor: false
+ vectorized: true
+ Reduce Vectorization:
+ enabled: false
+ enableConditionsMet: hive.vectorized.execution.reduce.enabled IS true
+ enableConditionsNotMet: hive.execution.engine mr IN [tez, spark] IS false
Reduce Operator Tree:
Group By Operator
aggregations: sum(VALUE._col0)
keys: KEY._col0 (type: string)
mode: mergepartial
outputColumnNames: _col0, _col1
- Statistics: Num rows: 2 Data size: 255 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 2 Data size: 271 Basic stats: COMPLETE Column stats: NONE
Select Operator
expressions: _col0 (type: string), round((UDFToDouble(_col1) / 60.0), 2) (type: double)
outputColumnNames: _col0, _col1
- Statistics: Num rows: 2 Data size: 255 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 2 Data size: 271 Basic stats: COMPLETE Column stats: NONE
File Output Operator
compressed: false
- Statistics: Num rows: 2 Data size: 255 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 2 Data size: 271 Basic stats: COMPLETE Column stats: NONE
table:
input format: org.apache.hadoop.mapred.SequenceFileInputFormat
output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -98,6 +142,7 @@ GROUP BY str2
POSTHOOK: type: QUERY
POSTHOOK: Input: default@str_str_orc
#### A masked pattern was here ####
+NULL 0.0
X 0.02
y 0.0
PREHOOK: query: EXPLAIN VECTORIZATION EXPRESSION
@@ -109,8 +154,8 @@ SELECT COALESCE(str1, 0) as result
from str_str_orc
POSTHOOK: type: QUERY
PLAN VECTORIZATION:
- enabled: false
- enabledConditionsNotMet: [hive.vectorized.execution.enabled IS false]
+ enabled: true
+ enabledConditionsMet: [hive.vectorized.execution.enabled IS true]
STAGE DEPENDENCIES:
Stage-1 is a root stage
@@ -122,18 +167,38 @@ STAGE PLANS:
Map Operator Tree:
TableScan
alias: str_str_orc
- Statistics: Num rows: 4 Data size: 510 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 5 Data size: 678 Basic stats: COMPLETE Column stats: NONE
+ TableScan Vectorization:
+ native: true
Select Operator
expressions: COALESCE(str1,0) (type: string)
outputColumnNames: _col0
- Statistics: Num rows: 4 Data size: 510 Basic stats: COMPLETE Column stats: NONE
+ Select Vectorization:
+ className: VectorSelectOperator
+ native: true
+ projectedOutputColumnNums: [4]
+ selectExpressions: VectorCoalesce(columns [0, 3])(children: col 0:string, ConstantVectorExpression(val 0) -> 3:string) -> 4:string
+ Statistics: Num rows: 5 Data size: 678 Basic stats: COMPLETE Column stats: NONE
File Output Operator
compressed: false
- Statistics: Num rows: 4 Data size: 510 Basic stats: COMPLETE Column stats: NONE
+ File Sink Vectorization:
+ className: VectorFileSinkOperator
+ native: false
+ Statistics: Num rows: 5 Data size: 678 Basic stats: COMPLETE Column stats: NONE
table:
input format: org.apache.hadoop.mapred.SequenceFileInputFormat
output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+ Execution mode: vectorized
+ Map Vectorization:
+ enabled: true
+ enabledConditionsMet: hive.vectorized.use.vectorized.input.format IS true
+ inputFormatFeatureSupport: []
+ featureSupportInUse: []
+ inputFileFormats: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
+ allNative: false
+ usesVectorUDFAdaptor: false
+ vectorized: true
Stage: Stage-0
Fetch Operator
@@ -155,6 +220,7 @@ POSTHOOK: Input: default@str_str_orc
0
1
0
+0
PREHOOK: query: EXPLAIN VECTORIZATION EXPRESSION
SELECT
str2, ROUND(sum(cast(COALESCE(str1, 0) as int))/60, 2) as result
@@ -181,7 +247,7 @@ STAGE PLANS:
Map Operator Tree:
TableScan
alias: str_str_orc
- Statistics: Num rows: 4 Data size: 510 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 5 Data size: 678 Basic stats: COMPLETE Column stats: NONE
TableScan Vectorization:
native: true
Select Operator
@@ -192,7 +258,7 @@ STAGE PLANS:
native: true
projectedOutputColumnNums: [1, 5]
selectExpressions: CastStringToLong(col 4:string)(children: VectorCoalesce(columns [0, 3])(children: col 0:string, ConstantVectorExpression(val 0) -> 3:string) -> 4:string) -> 5:int
- Statistics: Num rows: 4 Data size: 510 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 5 Data size: 678 Basic stats: COMPLETE Column stats: NONE
Group By Operator
aggregations: sum(_col1)
Group By Vectorization:
@@ -206,7 +272,7 @@ STAGE PLANS:
keys: _col0 (type: string)
mode: hash
outputColumnNames: _col0, _col1
- Statistics: Num rows: 4 Data size: 510 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 5 Data size: 678 Basic stats: COMPLETE Column stats: NONE
Reduce Output Operator
key expressions: _col0 (type: string)
sort order: +
@@ -216,7 +282,7 @@ STAGE PLANS:
native: false
nativeConditionsMet: hive.vectorized.execution.reducesink.new.enabled IS true, No PTF TopN IS true, No DISTINCT columns IS true, BinarySortableSerDe for keys IS true, LazyBinarySerDe for values IS true
nativeConditionsNotMet: hive.execution.engine mr IN [tez, spark] IS false
- Statistics: Num rows: 4 Data size: 510 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 5 Data size: 678 Basic stats: COMPLETE Column stats: NONE
value expressions: _col1 (type: bigint)
Execution mode: vectorized
Map Vectorization:
@@ -238,14 +304,14 @@ STAGE PLANS:
keys: KEY._col0 (type: string)
mode: mergepartial
outputColumnNames: _col0, _col1
- Statistics: Num rows: 2 Data size: 255 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 2 Data size: 271 Basic stats: COMPLETE Column stats: NONE
Select Operator
expressions: _col0 (type: string), round((UDFToDouble(_col1) / 60.0), 2) (type: double)
outputColumnNames: _col0, _col1
- Statistics: Num rows: 2 Data size: 255 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 2 Data size: 271 Basic stats: COMPLETE Column stats: NONE
File Output Operator
compressed: false
- Statistics: Num rows: 2 Data size: 255 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 2 Data size: 271 Basic stats: COMPLETE Column stats: NONE
table:
input format: org.apache.hadoop.mapred.SequenceFileInputFormat
output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -271,6 +337,7 @@ GROUP BY str2
POSTHOOK: type: QUERY
POSTHOOK: Input: default@str_str_orc
#### A masked pattern was here ####
+NULL 0.0
X 0.02
y 0.0
PREHOOK: query: EXPLAIN VECTORIZATION EXPRESSION
@@ -295,7 +362,7 @@ STAGE PLANS:
Map Operator Tree:
TableScan
alias: str_str_orc
- Statistics: Num rows: 4 Data size: 510 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 5 Data size: 678 Basic stats: COMPLETE Column stats: NONE
TableScan Vectorization:
native: true
Select Operator
@@ -306,13 +373,13 @@ STAGE PLANS:
native: true
projectedOutputColumnNums: [4]
selectExpressions: VectorCoalesce(columns [0, 3])(children: col 0:string, ConstantVectorExpression(val 0) -> 3:string) -> 4:string
- Statistics: Num rows: 4 Data size: 510 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 5 Data size: 678 Basic stats: COMPLETE Column stats: NONE
File Output Operator
compressed: false
File Sink Vectorization:
className: VectorFileSinkOperator
native: false
- Statistics: Num rows: 4 Data size: 510 Basic stats: COMPLETE Column stats: NONE
+ Statistics: Num rows: 5 Data size: 678 Basic stats: COMPLETE Column stats: NONE
table:
input format: org.apache.hadoop.mapred.SequenceFileInputFormat
output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -348,3 +415,4 @@ POSTHOOK: Input: default@str_str_orc
0
1
0
+0