nuno-faria commented on code in PR #17062:
URL: https://github.com/apache/datafusion/pull/17062#discussion_r2259730315
##########
datafusion/datasource-parquet/src/file_format.rs:
##########
@@ -447,19 +447,16 @@ impl FileFormat for ParquetFormat {
let mut source = ParquetSource::new(self.options.clone());
- // Use the CachedParquetFileReaderFactory when metadata caching is
enabled
- if self.options.global.cache_metadata {
- if let Some(metadata_cache) =
- state.runtime_env().cache_manager.get_file_metadata_cache()
- {
- let store = state
- .runtime_env()
- .object_store(conf.object_store_url.clone())?;
- let cached_parquet_read_factory =
- Arc::new(CachedParquetFileReaderFactory::new(store,
metadata_cache));
- source =
-
source.with_parquet_file_reader_factory(cached_parquet_read_factory);
- }
+ // Use the CachedParquetFileReaderFactory
+ if let Some(metadata_cache) =
+ state.runtime_env().cache_manager.get_file_metadata_cache()
Review Comment:
After #17031 is merged the `metadata_cache` won't be an `Option` anymore, so
this can be simplified.
--
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]