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


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/InferPredicateByReplace.java:
##########
@@ -171,6 +175,27 @@ private static <T extends Expression> Set<Expression> 
getEqualSetAndDoReplace(T
         return res;
     }
 
+    private static boolean canReplace(Expression source, Expression target, 
Expression predicate) {
+        Expression comparison = predicate instanceof Not ? predicate.child(0) 
: predicate;
+        // Direct comparisons observe comparison equality rather than a 
value's type or representation.
+        // Do not descend through functions, casts or OR to apply this 
exception.
+        if ((comparison instanceof ComparisonPredicate || comparison 
instanceof InPredicate)

Review Comment:
   fixed



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