rdettai opened a new issue #987: URL: https://github.com/apache/arrow-datafusion/issues/987
**Is your feature request related to a problem or challenge? Please describe what you are trying to do.** This is a follow up to #962. Currently we cannot compute all the statistics at instantiation because some implementations of the `ExecutionPlan` trait are mutable. **Describe the solution you'd like** The proposition is to make all ExecutionPlan implementations immutable and then transform the statistics method signature to: ```fn statistics(&self) -> &Statistics;``` **Describe alternatives you've considered** Instead of trying to compute the statistics at instantiation, a solution could be to have `statistics(&mut self)` and cache the result from there. But if the plan is mutable this is error prone because the cached statistics needs to be correctly invalidated when updates occur. **Additional context** https://github.com/apache/arrow-datafusion/pull/965#discussion_r705963059 -- 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]
