jayzhan211 commented on code in PR #15379: URL: https://github.com/apache/datafusion/pull/15379#discussion_r2011061049
########## datafusion/core/src/datasource/statistics.rs: ########## @@ -39,8 +39,8 @@ pub async fn get_statistics_with_limit( file_schema: SchemaRef, limit: Option<usize>, collect_stats: bool, -) -> Result<(Vec<PartitionedFile>, Statistics)> { - let mut result_files = vec![]; +) -> Result<(FileGroup, Statistics)> { + let mut result_files = FileGroup::default(); Review Comment: Can we return `result_files.with_statistics(statistics)`? I didn't see other place where we call `with_statistics` the inner optional statistics is confusing to me ########## datafusion/core/src/datasource/statistics.rs: ########## @@ -39,8 +39,8 @@ pub async fn get_statistics_with_limit( file_schema: SchemaRef, limit: Option<usize>, collect_stats: bool, -) -> Result<(Vec<PartitionedFile>, Statistics)> { - let mut result_files = vec![]; +) -> Result<(FileGroup, Statistics)> { + let mut result_files = FileGroup::default(); Review Comment: Can we return `result_files.with_statistics(statistics)`? I didn't see other place where we call `with_statistics` the inner optional statistics in FileGroup is confusing to me -- 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