alamb commented on code in PR #9490:
URL: https://github.com/apache/arrow-datafusion/pull/9490#discussion_r1518231309
##########
datafusion/core/src/datasource/listing/table.rs:
##########
@@ -893,6 +870,43 @@ impl ListingTable {
statistics,
))
}
+
+ /// Collects statistics for a given partitioned file.
+ ///
+ /// This method first checks if the statistics for the given file are
already cached.
+ /// If they are, it returns the cached statistics.
+ /// If they are not, it infers the statistics from the file and stores
them in the cache.
+ async fn do_collect_statistics<'a>(
+ &'a self,
+ ctx: &SessionState,
+ store: &Arc<dyn ObjectStore>,
+ part_file: &PartitionedFile,
+ ) -> Result<Statistics> {
+ let statistics_cache = self.collected_statistics.clone();
+ return match statistics_cache
Review Comment:
I wonder if you need this return here? Maybe it could be something like
```suggestion
match statistics_cache
```
(you also have to remove the `;` at the end)
I am surprised clippy didn't flag that.
--
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]