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

   Part of https://github.com/apache/datafusion/issues/19795
   
   As `with_new_children` clones the most fields of the plan, we could make 
clone cheaper, arcing immutable parts that may be long (projection, different 
expressions), the issue suggests to:
   
   * Store `projection` as `Option<Arc<[usize]>>` instead of 
`Option<Vec<usize>>` in `FilterExec`, `HashJoinExec`, `NestedLoopJoinExec`.
   * Store `exprs` as `Arc<[ProjectionExpr]>` instead of `Vec` in 
`ProjectionExprs`.
   * Store arced aggregation and filter expressions within `AggregateExec`.
   * Store arced `expr`, `null_expr`, `groups` in `PhysicalGroupBy`.
   
   Also, to simplify implementation, we could improve `project_schema` and 
`Statistics::project` methods to get `Option<impl AsRef<[usize]>>` instead of 
the `Option<&Vec<usize>>` as `Option<&Vec>` always could be borrowed as deref. 
   


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