t3rmin4t0r commented on a change in pull request #656: HIVE-21742 :
Vectorization: CASE result type casting
URL: https://github.com/apache/hive/pull/656#discussion_r289582883
##########
File path: ql/src/test/results/clientpositive/vectorized_case.q.out
##########
@@ -705,13 +705,13 @@ STAGE PLANS:
native: true
vectorizationSchemaColumns:
[0:member:decimal(10,0)/DECIMAL_64, 1:attr:decimal(10,0)/DECIMAL_64,
2:ROW__ID:struct<writeid:bigint,bucketid:int,rowid:bigint>]
Select Operator
- expressions: CASE WHEN ((member = 1)) THEN ((attr + 1)) ELSE (2)
END (type: decimal(11,0))
+ expressions: CASE WHEN ((member = 1)) THEN ((attr + 1)) ELSE
(CAST( 2 AS decimal(11,0))) END (type: decimal(11,0))
outputColumnNames: _col0
Select Vectorization:
className: VectorSelectOperator
native: true
- projectedOutputColumnNums: [9]
- selectExpressions: IfExprDecimalColumnColumn(col 6:boolean,
col 10:decimal(11,0)col 8:decimal(11,0))(children:
Decimal64ColEqualDecimal64Scalar(col 0:decimal(10,0)/DECIMAL_64, decimal64Val
1, decimalVal 1) -> 6:boolean, ConvertDecimal64ToDecimal(col
7:decimal(11,0)/DECIMAL_64)(children: Decimal64ColAddDecimal64Scalar(col
1:decimal(10,0)/DECIMAL_64, decimal64Val 1, decimalVal 1) ->
7:decimal(11,0)/DECIMAL_64) -> 10:decimal(11,0), ConstantVectorExpression(val
2) -> 8:decimal(11,0)) -> 9:decimal(11,0)
+ projectedOutputColumnNums: [8]
+ selectExpressions: IfExprDecimal64ColumnDecimal64Scalar(col
6:boolean, col 7:decimal(11,0)/DECIMAL_64, decimal64Val 2, decimalVal
2)(children: Decimal64ColEqualDecimal64Scalar(col 0:decimal(10,0)/DECIMAL_64,
decimal64Val 1, decimalVal 1) -> 6:boolean, Decimal64ColAddDecimal64Scalar(col
1:decimal(10,0)/DECIMAL_64, decimal64Val 1, decimalVal 1) ->
7:decimal(11,0)/DECIMAL_64) -> 8:decimal(11,0)/DECIMAL_64
Review comment:
This is pretty neat, the expression optimized to a faster one.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]