englefly commented on code in PR #15949: URL: https://github.com/apache/doris/pull/15949#discussion_r1080724336
########## fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/Multiply.java: ########## @@ -44,7 +45,11 @@ public Expression withChildren(List<Expression> children) { @Override public DataType getDataType() { - return left().getDataType().promotion(); + DataType rightType = child(0).getDataType(); + DataType leftType = child(1).getDataType(); + DataType outputType = TypeCoercionUtils.findTightestCommonType(null, + rightType, leftType).orElseGet(() -> rightType); + return outputType; Review Comment: we need refactor getDateType() for all functions -- 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