Phoenix500526 commented on code in PR #23201:
URL: https://github.com/apache/datafusion/pull/23201#discussion_r3486089817
##########
datafusion/catalog-listing/src/table.rs:
##########
@@ -990,17 +985,21 @@ impl ListingTable {
store: &Arc<dyn ObjectStore>,
part_file: &PartitionedFile,
) -> datafusion_common::Result<(Arc<Statistics>, Option<LexOrdering>)> {
- use datafusion_execution::cache::cache_manager::CachedFileMetadata;
-
- let path = TableScopedPath {
+ let key = FileStatisticsCacheKey {
table: part_file.table_reference.clone(),
path: part_file.object_meta.location.clone(),
+ // Statistics are computed against `file_schema`, so key on its
+ // fingerprint: reads of the same path under a different schema get
+ // their own entry rather than reusing incompatible column
statistics.
+ // The fingerprint is precomputed once per table (see `try_new`).
+ schema: Arc::clone(&self.file_schema_fingerprint),
Review Comment:
Thanks for the comment. I've precalcuated hash for the fingerprint. It seems
that only whitelisted users can trigger benchmark. Could you help trigger one?
--
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]