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 2020/01/25 17:39:51 UTC

[GitHub] [hive] jcamachor commented on a change in pull request #887: HIVE-22746

jcamachor commented on a change in pull request #887: HIVE-22746
URL: https://github.com/apache/hive/pull/887#discussion_r370945831
 
 

 ##########
 File path: ql/src/java/org/apache/hadoop/hive/ql/plan/ExprNodeDescUtils.java
 ##########
 @@ -1001,17 +1002,10 @@ public static boolean isSame(List<ExprNodeDesc> first, List<ExprNodeDesc> second
   // Given an expression this method figures out if the type for the expression belongs to string group
   // e.g. (String, Char, Varchar etc)
   public static boolean isStringType(ExprNodeDesc expr) {
-    TypeInfo typeInfo = expr.getTypeInfo();
-    if (typeInfo.getCategory() == ObjectInspector.Category.PRIMITIVE) {
-      PrimitiveObjectInspector.PrimitiveCategory primitiveCategory = ((PrimitiveTypeInfo) typeInfo).getPrimitiveCategory();
-      if (PrimitiveObjectInspectorUtils.getPrimitiveGrouping(primitiveCategory) ==
-          PrimitiveObjectInspectorUtils.PrimitiveGrouping.STRING_GROUP) {
-        return true;
-      }
-    }
-    return false;
+    return TypeCheckProcFactory.isStringType(expr.getTypeInfo());
 
 Review comment:
   It was not called anymore, I have just removed it.

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