You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2021/09/30 07:20:17 UTC

[GitHub] [incubator-doris] HappenLee commented on a change in pull request #6768: [BUG] Fix the bug of query in expr

HappenLee commented on a change in pull request #6768:
URL: https://github.com/apache/incubator-doris/pull/6768#discussion_r719126269



##########
File path: fe/fe-core/src/main/java/org/apache/doris/catalog/Type.java
##########
@@ -1018,6 +1018,13 @@ public static Type getCmpType(Type t1, Type t2) {
                 || (t1ResultType == PrimitiveType.VARCHAR && t2ResultType == PrimitiveType.STRING)) {
             return Type.STRING;
         }
+
+        // int family type and char family type should cast to char family type
+        if ((t1ResultType.isFixedPointType() && t2ResultType.isCharFamily()) ||
+                (t2ResultType.isFixedPointType() && t1ResultType.isCharFamily())) {
+            return t1.isStringType() ?  t1 : t2;

Review comment:
       这个逻辑只会用在in和between in,我测试一下




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

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org