starocean999 commented on code in PR #19926:
URL: https://github.com/apache/doris/pull/19926#discussion_r1201578847


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/ArithmeticExpr.java:
##########
@@ -536,7 +536,7 @@ private void analyzeDecimalV3Op(Type t1, Type t2) throws 
AnalysisException {
     public void analyzeImpl(Analyzer analyzer) throws AnalysisException {
         if (VectorizedUtil.isVectorized()) {
             for (Expr child : children) {
-                if (child instanceof DecimalLiteral && 
child.getType().isDecimalV3()) {
+                if (child instanceof DecimalLiteral && 
child.getType().isDecimalV3() && !child.getIsCasted()) {
                     ((DecimalLiteral) child).tryToReduceType();

Review Comment:
   try sql `select 1.0000000 / cast(3 as DECIMALV3(1, 0));` seems this pr can't 
handle such case, IMO,`tryToReduceType()` method is ambiguous, it's not clear 
why need this function, is it possible to remove it? 



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

Reply via email to