You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature] (All) logical optimizers should optimize subqueries #2480
Describe the solution you'd like
Logical optimizer only walks LogicalPlan node inputs. However, realistically, every optimizer should now also walk every subquery by matching on Filter(Filter { expr: conjunction(vec![.., InSubquery/Exists { subquery }, ..] } and optimize the subquery too.
One solution may be to declare subqueries as one of the inputs to the plan nodes...? However, this may "denormalize" certain things, so it may be better to add a helper function (based on e.g. visit/accept) that makes it easy for all optimizations to detect and walk subqueries.
changed the title [-][Feature] Logical optimizer should walk subqueries[/-][+][Feature] (All) logical optimizers should optimize subqueries[/+]on May 7, 2022
I'm interested in applying for GSoC this year for this project idea which links the EPIC where this issue is mentioned in. Since I'm interested I thought about contributing again to Datafusion.
Is there still work to be done on this or did this pr already implement it?
Activity
[-][Feature] Logical optimizer should walk subqueries[/-][+][Feature] (All) logical optimizers should optimize subqueries[/+]Run optimzer rules on subqueries by default
Run optimzer rules on subqueries by default
Run optimzer rules on subqueries by default (#13066)
LorrensP-2158466 commentedon Mar 19, 2025
I'm interested in applying for GSoC this year for this project idea which links the EPIC where this issue is mentioned in. Since I'm interested I thought about contributing again to Datafusion.
Is there still work to be done on this or did this pr already implement it?
alamb commentedon Feb 19, 2026
I agree I think this is already complete