From 516edf3e060465084c8549d346110f8fdd46dab7 Mon Sep 17 00:00:00 2001 From: Adrian Garcia Badaracco <1755071+adriangb@users.noreply.github.com> Date: Fri, 1 Nov 2024 10:51:08 -0500 Subject: [PATCH] fmt, lint --- datafusion/core/src/datasource/listing/mod.rs | 1 + datafusion/core/src/datasource/physical_plan/parquet/opener.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/datafusion/core/src/datasource/listing/mod.rs b/datafusion/core/src/datasource/listing/mod.rs index 2c2b7195ff33..c44291082cec 100644 --- a/datafusion/core/src/datasource/listing/mod.rs +++ b/datafusion/core/src/datasource/listing/mod.rs @@ -123,6 +123,7 @@ impl PartitionedFile { .with_range(start, end) } + /// Add a metadata size hint to this file pub fn with_metadata_size_hint(mut self, metadata_size_hint: usize) -> Self { self.metadata_size_hint = Some(metadata_size_hint); self diff --git a/datafusion/core/src/datasource/physical_plan/parquet/opener.rs b/datafusion/core/src/datasource/physical_plan/parquet/opener.rs index b23f7e25187d..3492bcc85f02 100644 --- a/datafusion/core/src/datasource/physical_plan/parquet/opener.rs +++ b/datafusion/core/src/datasource/physical_plan/parquet/opener.rs @@ -88,7 +88,7 @@ impl FileOpener for ParquetOpener { let file_name = file_meta.location().to_string(); let file_metrics = ParquetFileMetrics::new(self.partition_index, &file_name, &self.metrics); - + let metadata_size_hint = file_meta.metadata_size_hint.or(self.metadata_size_hint); let mut reader: Box =