vineetgarg02 commented on a change in pull request #656: HIVE-21742 : 
Vectorization: CASE result type casting
URL: https://github.com/apache/hive/pull/656#discussion_r290042782
 
 

 ##########
 File path: ql/src/test/results/clientpositive/perf/spark/query77.q.out
 ##########
 @@ -826,7 +826,7 @@ STAGE PLANS:
                 outputColumnNames: _col1, _col2, _col3, _col4, _col5
                 Statistics: Num rows: 95833780 Data size: 13030622681 Basic 
stats: COMPLETE Column stats: NONE
                 Select Operator
-                  expressions: 'web channel' (type: string), _col3 (type: 
int), _col4 (type: decimal(17,2)), CASE WHEN (_col1 is not null) THEN (_col1) 
ELSE (0) END (type: decimal(17,2)), (_col5 - CASE WHEN (_col2 is not null) THEN 
(_col2) ELSE (0) END) (type: decimal(18,2))
+                  expressions: 'web channel' (type: string), _col3 (type: 
int), _col4 (type: decimal(17,2)), CASE WHEN (_col1 is not null) THEN (_col1) 
ELSE (CAST( 0 AS decimal(17,2))) END (type: decimal(17,2)), (_col5 - CASE WHEN 
(_col2 is not null) THEN (_col2) ELSE (CAST( 0 AS decimal(17,2))) END) (type: 
decimal(18,2))
 
 Review comment:
   This is due to calcite planner introducing case expression with mismatched 
type. Hive planner introduces cast to fix this and there is no (FULL) constant 
propagation afterwards. I'll do a follow-up to investigate and properly fix 
this.

----------------------------------------------------------------
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]

Reply via email to