alamb commented on code in PR #26044:
URL: https://github.com/apache/datafusion/pull/26044#discussion_r4367184471
##########
datafusion/optimizer/src/decorrelate.rs:
##########
@@ -92,6 +93,12 @@ pub struct PullUpCorrelatedExpr {
/// The list is cleared when the pull up passes a node that can put a NULL
/// back into such a column: an outer join, a union or a grouping set.
pub correlated_filters: Vec<Expr>,
+ /// `join_filters.len()` at each `SubqueryAlias` on the way down.
+ ///
+ /// Filters appended while that alias is being rewritten belong to its
+ /// subtree. On the way up, only those filters are requalified to the
+ /// alias, so a sibling filter that names the same column is left alone.
+ alias_filter_base: Vec<usize>,
Review Comment:
I can't help but feel this decorrelate rule is growing too complicated with
all these special cases. I feel like rather than patching all these corner
cases, we need to start considering reworking how we decorreleate these joins
in general, see
- https://github.com/apache/datafusion/issues/5492
--
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]