morristai commented on code in PR #26634:
URL: https://github.com/apache/datafusion/pull/26634#discussion_r4584359491
##########
datafusion/physical-optimizer/src/projection_pushdown.rs:
##########
@@ -363,7 +374,28 @@ impl<'a> JoinFilterRewriter<'a> {
let depends_on_other_side =
self.depends_on_join_side(&expr, self.join_side.negate())?;
if depends_on_other_side || is_volatile(&expr) {
- return expr.map_children(|expr| self.rewrite(expr));
+ // The top-level conjuncts carry no evaluation order: the logical
optimizer splits the
+ // filter into conjuncts, reorders them and may push single-side
ones below the join.
+ // Below them, children that the expression evaluates only for
some rows stay in the
+ // filter, because a projection below the join would evaluate them
for every row.
+ let conjunct = conjunct
Review Comment:
After the other two changes (splitting the conjuncts and the new trait
method), this block is only one `if expr.short_circuits()`.
--
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]