hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject [1/2] hive git commit: HIVE-14431 : Recognize COALESCE as CASE (Remus Rusanu, Jesus Camacho Rodriguez via Ashutosh Chauhan, Zoltan Haindrich)
Date Sun, 07 Oct 2018 15:24:27 GMT
Repository: hive
Updated Branches:
  refs/heads/master 3068f03a2 -> 3bd9d63ec


http://git-wip-us.apache.org/repos/asf/hive/blob/3bd9d63e/ql/src/test/results/clientpositive/vector_coalesce_3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/vector_coalesce_3.q.out b/ql/src/test/results/clientpositive/vector_coalesce_3.q.out
index 4b40d93..30cfced 100644
--- a/ql/src/test/results/clientpositive/vector_coalesce_3.q.out
+++ b/ql/src/test/results/clientpositive/vector_coalesce_3.q.out
@@ -129,13 +129,13 @@ STAGE PLANS:
                 outputColumnNames: _col0, _col2
                 Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats:
NONE
                 Select Operator
-                  expressions: _col0 (type: bigint), CASE WHEN ((COALESCE(_col2,5) > 1))
THEN (_col2) ELSE (null) END (type: bigint)
+                  expressions: _col0 (type: bigint), CASE WHEN (CASE WHEN (_col2 is not null)
THEN ((_col2 > 1L)) ELSE (true) END) THEN (_col2) ELSE (null) END (type: bigint)
                   outputColumnNames: _col0, _col1
                   Select Vectorization:
                       className: VectorSelectOperator
                       native: true
-                      projectedOutputColumnNums: [0, 3]
-                      selectExpressions: IfExprColumnNull(col 2:boolean, col 1:bigint, null)(children:
LongColGreaterLongScalar(col 3:bigint, val 1)(children: VectorCoalesce(columns [1, 2])(children:
col 1:bigint, ConstantVectorExpression(val 5) -> 2:bigint) -> 3:bigint) -> 2:boolean,
col 1:bigint) -> 3:bigint
+                      projectedOutputColumnNums: [0, 6]
+                      selectExpressions: IfExprColumnNull(col 5:boolean, col 1:bigint, null)(children:
IfExprCondExprColumn(col 2:boolean, col 3:boolean, col 4:boolean)(children: IsNotNull(col
1:bigint) -> 2:boolean, LongColGreaterLongScalar(col 1:bigint, val 1) -> 3:boolean,
ConstantVectorExpression(val 1) -> 4:boolean) -> 5:boolean, col 1:bigint) -> 6:bigint
                   Statistics: Num rows: 5 Data size: 35 Basic stats: COMPLETE Column stats:
NONE
                   File Output Operator
                     compressed: false

http://git-wip-us.apache.org/repos/asf/hive/blob/3bd9d63e/ql/src/test/results/clientpositive/vector_coalesce_4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/vector_coalesce_4.q.out b/ql/src/test/results/clientpositive/vector_coalesce_4.q.out
index a3be699..89aa21b 100644
--- a/ql/src/test/results/clientpositive/vector_coalesce_4.q.out
+++ b/ql/src/test/results/clientpositive/vector_coalesce_4.q.out
@@ -55,13 +55,13 @@ STAGE PLANS:
                 native: true
                 vectorizationSchemaColumns: [0:a:int, 1:b:int, 2:ROW__ID:struct<writeid:bigint,bucketid:int,rowid:bigint>]
             Select Operator
-              expressions: COALESCE(a,b) (type: int), a (type: int), b (type: int)
+              expressions: CASE WHEN (a is not null) THEN (a) ELSE (b) END (type: int), a
(type: int), b (type: int)
               outputColumnNames: _col0, _col1, _col2
               Select Vectorization:
                   className: VectorSelectOperator
                   native: true
-                  projectedOutputColumnNums: [3, 0, 1]
-                  selectExpressions: VectorCoalesce(columns [0, 1])(children: col 0:int,
col 1:int) -> 3:int
+                  projectedOutputColumnNums: [4, 0, 1]
+                  selectExpressions: IfExprLongColumnLongColumn(col 3:boolean, col 0:int,
col 1:int)(children: IsNotNull(col 0:int) -> 3:boolean) -> 4:int
               Statistics: Num rows: 2 Data size: 8 Basic stats: COMPLETE Column stats: NONE
               Reduce Output Operator
                 key expressions: _col1 (type: int), _col2 (type: int)
@@ -88,7 +88,7 @@ STAGE PLANS:
               includeColumns: [0, 1]
               dataColumns: a:int, b:int
               partitionColumnCount: 0
-              scratchColumnTypeNames: [bigint]
+              scratchColumnTypeNames: [bigint, bigint]
       Reduce Vectorization:
           enabled: false
           enableConditionsMet: hive.vectorized.execution.reduce.enabled IS true


Mime
View raw message