Daft icon indicating copy to clipboard operation
Daft copied to clipboard

[Query Planner] Add builder abstraction for `PhysicalPlan`

Open clarkzinzow opened this issue 1 year ago • 0 comments

Adding a builder abstraction for PhysicalPlan, similar to our LogicalPlanBuilder for LogicalPlan, has a few advantages:

  • logic for adding a particular op to the PhysicalPlan can be isolated to a builder method, which should decrease the complexity of the query planner's nearly 1000 line logical -> physical match statement: https://github.com/Eventual-Inc/Daft/blob/3b77a84269b1c04699574a4b6cb11e10f1e09bb8/src/daft-plan/src/planner.rs#L32-L780
  • the builder will make it easier to use structural equality for tests for the query planner, physical plan ops, and future physical plan optimizers.

clarkzinzow avatar Feb 12 '24 18:02 clarkzinzow