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
Move large LogicalPlan arms out of DefaultPhysicalPlanner::map_logical_node_to_physical #26300
The match over variants is natural, but many arms carry large inline bodies:
Join (about L1372-L1844, ~470 lines, selecting between hash, sort-merge, nested-loop and cross joins)
Aggregate (about L1010-L1197)
Copy and the five Dml arms (about L693-L932)
Window
Some arms already delegate to helpers (e.g. Projection, Explain, Analyze), so the pattern is established.
Describe the solution you'd like
Keep the top-level match as a one-line-per-arm dispatcher and move each large arm into a private method on DefaultPhysicalPlanner: plan_join (further split by join algorithm), plan_aggregate, plan_window, plan_copy, plan_dml (one method for the five Dml arms), and so on. Do it incrementally, one arm per PR, starting with Join and Aggregate. Optionally move them into submodules (physical_planner/join.rs, aggregate.rs, dml.rs).
Describe alternatives you've considered
Leave it as is, at the cost of continued merge conflicts and harder review of planner changes.
Activity
refactor: extract aggregate physical planning (apache#26403)
LiXuanqi commentedon Oct 21, 2026
take