mkleen commented on code in PR #22613:
URL: https://github.com/apache/datafusion/pull/22613#discussion_r3332510748
##########
datafusion/execution/src/cache/cache_manager.rs:
##########
@@ -380,23 +333,21 @@ impl CacheManager {
}
Some(Arc::clone(lfc))
}
- None if config.list_files_cache_limit > 0 => {
- let lfc: Arc<dyn ListFilesCache> =
Arc::new(DefaultListFilesCache::new(
+ None if config.list_files_cache_limit > 0 => Some(Arc::new(
+ DefaultCache::<TableScopedPath, CachedFileList>::with_ttl(
config.list_files_cache_limit,
config.list_files_cache_ttl,
- ));
- Some(lfc)
- }
+ )
+ .with_name("DefaultListFilesCache"),
+ )),
_ => None,
};
Review Comment:
The semantics of `file_metadata_cache` is different to `list_file_cache` and
the `file_statistics_cache`. `list_file_cache` and `file_statistics_cache` are
optional and should be disabled resulting in `None` when the cache limit is
`0`. Therefore it cannot follow the same pattern.
--
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]