englefly commented on code in PR #12482:
URL: https://github.com/apache/doris/pull/12482#discussion_r966784837


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/util/TypeCoercionUtils.java:
##########
@@ -189,6 +193,10 @@ public static Optional<DataType> 
findTightestCommonType(DataType left, DataType
             }
         } else if (left instanceof CharacterType || right instanceof 
CharacterType) {
             tightestCommonType = StringType.INSTANCE;
+        } else if (left instanceof DecimalType && right instanceof 
IntegralType) {
+            tightestCommonType = DecimalType.forType(right);

Review Comment:
   What about this case:
    - left: Decimal(20,0)
    - right: int
   Here the tightestCommonType is Decimal(10, 0), which cannot cover left.
   Is this a problem?



-- 
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-unsubscr...@doris.apache.org

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


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

Reply via email to