LiBinfeng-01 commented on code in PR #23692:
URL: https://github.com/apache/doris/pull/23692#discussion_r1321036318


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PredicatePropagation.java:
##########
@@ -94,16 +94,21 @@ private boolean isDataTypeValid(DataType originDataType, 
Expression expr) {
                                             (IntegralType) 
leftSlotEqualToRightSlot.child(1).getDataType())) {
                         return true;
                     }
+                } else if (leftSlotEqualToRightSlot.child(0).getDataType()
+                        
.equals(leftSlotEqualToRightSlot.child(1).getDataType())) {
+                    return true;
                 }
                 return false;
             }
 
             private Expression replaceSlot(Expression expr, DataType 
originDataType) {
                 return expr.rewriteUp(e -> {
                     if (isDataTypeValid(originDataType, 
leftSlotEqualToRightSlot)) {
-                        if (ExpressionUtils.isTwoExpressionEqualWithCast(e, 
leftSlotEqualToRightSlot.child(0))) {
+                        if (ExpressionUtils.isTwoExpressionEqualWithCast(e, 
leftSlotEqualToRightSlot.child(0))
+                                && !(e instanceof Cast)) {

Review Comment:
   done



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