alamb commented on issue #20184: URL: https://github.com/apache/datafusion/issues/20184#issuecomment-3899708756
I think the Statistics API is somewhat bad now as it requires (a lot) of copying https://docs.rs/datafusion/latest/datafusion/common/struct.Statistics.html The `Vec` of ColumnStaitstics Each `ColumnStatistics` has a `ScalarValue` which is 64 bytes - so that means 4*64 + 2*8 = 272 bytes (probably more) **per column** The proposed API ```rust fn partition_statistics( &self, partition: Option<usize>, child_stats: Vec<Statistics>, ) -> Result<Statistics>; ``` Would require more allocations (the Vec and then owned `Statistics`) What would you all think about starting with some more base refactoring -- like for example encapsulating `Statistics` more (e.g. so that we could potentially make an ARC/ change its internal representation)? -- 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]
