-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem or challenge?
ExecutionPlan::apply_expressions (#20337) added a read-only visitor API for physical expressions. To complete the API that mirrors LogicalPlan::map_expressions — we should also implement a write counterpart that allows transforming expressions and reconstructing the node.
Use cases:
- Part of Prepared physical plan reusage #14342
- Any transformation that needs to replace expressions across a plan tree
Describe the solution you'd like
Proposed API:
fn map_expressions<F>(
self: Arc<Self>,
f: &mut F,
) -> Result<Transformed<Arc<dyn ExecutionPlan>>>
where
F: FnMut(Arc<dyn PhysicalExpr>) -> Result<Transformed<Arc<dyn PhysicalExpr>>>;
Each ExecutionPlan implementor is responsible for transforming its expressions and reconstructing itself using direct struct construction, so that the PlanProperties (schema, ordering, partitioning) are reused without recomputation -- matching the behavior of LogicalPlan::map_expressions.
Describe alternatives you've considered
No response
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request