morrySnow commented on code in PR #20634:
URL: https://github.com/apache/doris/pull/20634#discussion_r1223919170
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/util/TypeCoercionUtils.java:
##########
@@ -1077,12 +1077,26 @@ protected static Optional<DataType>
findCommonPrimitiveTypeForCaseWhen(DataType
return Optional.empty();
}
+ // decimalv3 and floating type
+ if (t1.isDecimalV3Type() || t2.isDecimalV3Type()) {
+ if (t1.isFloatType() || t2.isDoubleType() || t1.isDoubleType() ||
t2.isFloatType()) {
+ return t1.isDecimalV3Type() ? Optional.of(t2) :
Optional.of(t1);
+ }
+ }
Review Comment:
we need to select double or float according to decimal precision and scale
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]