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_r289582362
 
 

 ##########
 File path: 
ql/src/java/org/apache/hadoop/hive/ql/parse/TypeCheckProcFactory.java
 ##########
 @@ -1274,6 +1274,40 @@ protected ExprNodeDesc 
getXpathOrFuncExprNodeDesc(ASTNode expr,
               children);
         }
 
+        // introduce cast for expressions which are of different type than 
parent WHEN expr's type
+        // this is done so that vectorization is able to vectorize 
appropriately
+        if (genericUDF instanceof GenericUDFWhen && desc instanceof 
ExprNodeGenericFuncDesc) {
+          String castTypeName = desc.getTypeInfo().getTypeName();
+          if (desc.getTypeInfo() instanceof DecimalTypeInfo) {
 
 Review comment:
   Why is this a special case?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to