askalt opened a new pull request, #19792:
URL: https://github.com/apache/datafusion/pull/19792

   This patch aims to implement a fast-path for the 
ExecutionPlan::with_new_children function for some plans, moving closer to a 
physical plan re-use implementation and improving planning performance. If the 
passed children properties are the same as in self, we do not actually 
recompute self's properties  (which could be costly if projection mapping is 
required). Instead, we just replace the children and re-use self's properties 
as-is.
   
   To be able to compare two different properties -- 
ExecutionPlan::properties(...) signature is modified and now returns 
`&Arc<PlanProperties>`. If `children` properties are the same in 
`with_new_children` -- we clone our properties arc and then a parent plan will 
consider our properties as unchanged, doing the same.
   
   Also, there are other improvenets, all changes:
   
   - Return `&Arc<PlanProperties>` from `ExecutionPlan::properties(...)` 
instead of a reference.
   - Implement `with_new_children` fast-path if there is no children properties 
changes for plans:
     * SortExec
     * RepartitionExec
     * ProjectionExec
     * FilterExec
     * CoalescePartitionsExec
     * AggregateExec
   - Export `reset_plan_states` function.
   - Store `Arc<[usize]>` instead of vector within `FilterExec`.
   - Store `Arc<[Arc<AggregateFunctionExpr>]>` instead of vec for aggr expr and 
filters.
   - Store `Arc<[ProjectionExpr]> instead of vec in `ProjectionExprs` struct.
   


-- 
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