alamb commented on code in PR #19918:
URL: https://github.com/apache/datafusion/pull/19918#discussion_r2734050491


##########
datafusion/optimizer/src/push_down_filter.rs:
##########
@@ -457,9 +457,9 @@ fn push_down_all_join(
 
     // For infer predicates, if they can not push through join, just drop them
     for predicate in inferred_join_predicates {
-        if left_preserved && checker.is_left_only(&predicate) {
+        if checker.is_left_only(&predicate) {
             left_push.push(predicate);
-        } else if right_preserved && checker.is_right_only(&predicate) {
+        } else if checker.is_right_only(&predicate) {
             right_push.push(predicate);
         }

Review Comment:
   I think in order t to push a predicate through an outer join and maintain 
the same result we have to guarantee that any rows that survive the join and 
would have been null padded will be filtered.
   
   I agree in the case of predicates on the join key this holds (as any rows in 
t2 that are filtered are guaranteed not to match any resulting rows)



##########
datafusion/optimizer/src/push_down_filter.rs:
##########
@@ -457,9 +457,9 @@ fn push_down_all_join(
 
     // For infer predicates, if they can not push through join, just drop them

Review Comment:
   this comment now seems out of date too 🤔 



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