You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2019/06/01 00:18:37 UTC

[GitHub] [hive] t3rmin4t0r commented on a change in pull request #656: HIVE-21742 : Vectorization: CASE result type casting

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


With regards,
Apache Git Services

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