alamb commented on code in PR #7570:
URL: https://github.com/apache/arrow-datafusion/pull/7570#discussion_r1328091559
##########
datafusion/core/tests/parquet/mod.rs:
##########
@@ -40,6 +40,7 @@ use std::sync::Arc;
use tempfile::NamedTempFile;
mod custom_reader;
+mod file_statistics;
Review Comment:
👍
##########
datafusion/core/tests/parquet/mod.rs:
##########
@@ -40,6 +40,7 @@ use std::sync::Arc;
use tempfile::NamedTempFile;
mod custom_reader;
+mod file_statistics;
Review Comment:
👍
##########
datafusion/core/src/datasource/listing/table.rs:
##########
@@ -653,13 +620,22 @@ impl ListingTable {
table_schema: Arc::new(builder.finish()),
options,
definition: None,
- collected_statistics: Default::default(),
+ collected_statistics:
Arc::new(DefaultFileStatisticsCache::default()),
infinite_source,
};
Ok(table)
}
+ /// Takes a [`FileStatisticsCache`] from session context as cache input.
+ /// If not exit create a new [`DefaultFileStatisticsCache`],
+ /// Avoid get parquet files statistics multiple times in same session.
Review Comment:
```suggestion
/// Set the [`FileStatisticsCache`] used to cache parquet file
statistics.
///
/// Setting a statistics cache on the `SessionContext` can avoid
refetching statistics
/// multiple times in the same session.
///
/// If `None`, creates a new [`DefaultFileStatisticsCache`] scoped to
this query.
```
--
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]