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
Split PushDownFilter::rewrite into per-plan-node pushdown helpers #26305
It first simplifies and reorders the predicates (about L874-L917, including a subtle predicates_changed computation at about L895-L909), handles FALSE and fetch/skip early-outs, and then matches on the child plan. Simple arms (Sort, Repartition, Distinct) are fine, but several inline multi-step pushdown logic: SubqueryAlias column remapping (about L986-L1004), Unnest predicate classification (about L1018-L1084), Aggregate (about L1115), Window (about L1171), AsOfJoin (about L1261), TableScan (about L1315) and Extension (about L1401).
Every new plan type or pushdown tweak touches this one function, and the large arms can't be unit tested on their own.
Describe the solution you'd like
Keep rewrite as a dispatcher. Extract the preamble into simplify_filter_predicates(&mut Filter) -> Result<bool>, and move each non-trivial arm into a free function following the existing push_down_all_join / rewrite_projection pattern: push_down_subquery_alias, push_down_unnest, push_down_through_aggregate, push_down_through_window, push_down_through_asof_join, push_down_into_table_scan, push_down_through_extension. Optionally turn the file into a module directory (join, scan, simplify).
Activity
mohitgurav20 commentedon Oct 14, 2026
take