xudong963 commented on code in PR #15432: URL: https://github.com/apache/datafusion/pull/15432#discussion_r2013679682
########## datafusion/core/src/datasource/statistics.rs: ########## @@ -145,7 +147,142 @@ pub async fn get_statistics_with_limit( Ok((result_files, statistics)) } -fn add_row_stats( +/// Generic function to compute statistics across multiple items that have statistics +fn compute_summary_statistics<T, I>( + items: I, + file_schema: &SchemaRef, + stats_extractor: impl Fn(&T) -> Option<&Statistics>, +) -> Statistics +where + I: IntoIterator<Item = T>, +{ + let size = file_schema.fields().len(); Review Comment: From original code: https://github.com/apache/datafusion/pull/15432/files#diff-7c94461d5e47a42522e6864293a987c452858e1fa6da1e5e1363ee1f6f004a3cL50-L118 -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org