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 2023/01/09 07:03:28 UTC

[GitHub] [doris] morrySnow commented on a diff in pull request #15185: [Fix](Nereids)fix type coercion for binary arithmetic

morrySnow commented on code in PR #15185:
URL: https://github.com/apache/doris/pull/15185#discussion_r1064327792


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/util/TypeCoercionUtils.java:
##########
@@ -196,6 +194,8 @@ public static Optional<DataType> findTightestCommonType(DataType left, DataType
             tightestCommonType = right;
         } else if (right instanceof NullType) {
             tightestCommonType = left;
+        } else if (left instanceof BooleanType || right instanceof BooleanType) {
+            tightestCommonType = DoubleType.INSTANCE;
         } else if (left instanceof IntegralType && right instanceof DecimalV2Type

Review Comment:
   this is not right, think about boolean with decimal or with stringliketype



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