LiaCastaneda opened a new issue, #20899:
URL: https://github.com/apache/datafusion/issues/20899

   ### 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 https://github.com/apache/datafusion/issues/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_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to