DhamoPS commented on code in PR #3334:
URL: https://github.com/apache/arrow-datafusion/pull/3334#discussion_r961848506


##########
datafusion/sql/src/planner.rs:
##########
@@ -2453,6 +2453,17 @@ fn remove_join_expressions(
                     (_, Some(rr)) => Ok(Some(rr)),
                     _ => Ok(None),
                 }
+            },
+            // Fix for issue#78 join predicates from inside of OR expr also 
pulled up properly.
+            Operator::Or => {

Review Comment:
   We should not pull the predicates from disjunctions unless both left and 
right child of OR expr are having common conjunctions, since it will affect the 
query results. The idea for this fix is, "If there are common predicates in 
left and right child of OR expression then we should move those predicates to 
Join predicates. In case of Q19, it has common join predicate in all 3 OR 
expressions and so that Join predicate is pulled up to JOIN node. 



-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to