foxtail463 commented on code in PR #65250:
URL: https://github.com/apache/doris/pull/65250#discussion_r3662372318


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/EliminateOuterJoin.java:
##########
@@ -50,28 +47,26 @@ public class EliminateOuterJoin extends 
OneRewriteRuleFactory {
     public Rule build() {
         return logicalFilter(
                 logicalJoin().when(join -> join.getJoinType().isOuterJoin() || 
join.getJoinType().isAsofOuterJoin())
-        ).then(filter -> {
-            LogicalJoin<Plan, Plan> join = filter.child();
+        ).thenApply(ctx -> {
+            LogicalJoin<Plan, Plan> join = ctx.root.child();
 
-            Builder<Expression> conjunctsBuilder = ImmutableSet.builder();
-            Set<Slot> notNullSlots = new HashSet<>();
-            for (Expression predicate : filter.getConjuncts()) {
-                Optional<Slot> notNullSlot = TypeUtils.isNotNull(predicate);
-                if (notNullSlot.isPresent()) {
-                    notNullSlots.add(notNullSlot.get());
-                } else {
-                    conjunctsBuilder.add(predicate);
-                }
-            }
+            Set<Slot> notNullSlots = ExpressionUtils.inferNotNullSlots(

Review Comment:
   Not introduced by 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