This is an automated email from the ASF dual-hosted git repository. alamb pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/datafusion.git
The following commit(s) were added to refs/heads/main by this push: new af7587b866 fix: Ensure the CachedParquetFileReader respects the metadata prefetch hint (#17302) af7587b866 is described below commit af7587b8660560791417f0fd5a87521e3478e3d2 Author: Nuno Faria <nunofpfa...@gmail.com> AuthorDate: Sat Sep 13 22:45:43 2025 +0100 fix: Ensure the CachedParquetFileReader respects the metadata prefetch hint (#17302) --- datafusion/datasource-parquet/src/reader.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/datafusion/datasource-parquet/src/reader.rs b/datafusion/datasource-parquet/src/reader.rs index 9d2c52f721..d0c008ad35 100644 --- a/datafusion/datasource-parquet/src/reader.rs +++ b/datafusion/datasource-parquet/src/reader.rs @@ -209,6 +209,7 @@ impl ParquetFileReaderFactory for CachedParquetFileReaderFactory { file_metrics, file_meta, metadata_cache: Arc::clone(&self.metadata_cache), + metadata_size_hint, })) } } @@ -222,6 +223,7 @@ pub struct CachedParquetFileReader { pub inner: ParquetObjectReader, file_meta: FileMeta, metadata_cache: Arc<dyn FileMetadataCache>, + metadata_size_hint: Option<usize>, } impl AsyncFileReader for CachedParquetFileReader { @@ -261,11 +263,10 @@ impl AsyncFileReader for CachedParquetFileReader { #[cfg(not(feature = "parquet_encryption"))] let file_decryption_properties = None; - // TODO there should be metadata prefetch hint here - // https://github.com/apache/datafusion/issues/17279 DFParquetMetadata::new(&self.store, &file_meta.object_meta) .with_decryption_properties(file_decryption_properties) .with_file_metadata_cache(Some(Arc::clone(&metadata_cache))) + .with_metadata_size_hint(self.metadata_size_hint) .fetch_metadata() .await .map_err(|e| { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@datafusion.apache.org For additional commands, e-mail: commits-h...@datafusion.apache.org