feiniaofeiafei commented on code in PR #63690:
URL: https://github.com/apache/doris/pull/63690#discussion_r3402059618


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/util/ExpressionUtils.java:
##########
@@ -249,6 +250,11 @@ public static Expression rebuildSignature(Expression expr) 
{
                         BoundFunction rebuilt = (BoundFunction) 
fn.withChildren(newChildren);
                         rebuilt = (BoundFunction) 
TypeCoercionUtils.processBoundFunction(rebuilt);
                         return rebuilt;
+                    } else if (expr instanceof BinaryArithmetic) {
+                        BinaryArithmetic binaryArithmetic = (BinaryArithmetic) 
expr;
+                        BinaryArithmetic rebuilt = (BinaryArithmetic) 
binaryArithmetic.withChildren(newChildren);
+                        rebuilt = (BinaryArithmetic) 
TypeCoercionUtils.processBinaryArithmetic(rebuilt);
+                        return rebuilt;

Review Comment:
   This is not a bug in existing behavior. I added this branch earlier only to 
make the synthesized Multiply expressions in this rewrite go through type 
coercion, but after refactoring the EagerAggRewriter code now directly creates 
typed Multiply/Nvl expressions with 
TypeCoercionUtils.processBinaryArithmetic/processBoundFunction.
   
   So this generic BinaryArithmetic handling in 
ExpressionUtils.rebuildSignature() is no longer needed, and I removed it from 
this PR.



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