From cbf10f182b9d2e4da2be93e876c7f4a8057f742c Mon Sep 17 00:00:00 2001 From: Adrian Garcia Badaracco <1755071+adriangb@users.noreply.github.com> Date: Wed, 8 Oct 2025 14:05:26 -0500 Subject: [PATCH] fix docs and broken example from #17956 --- datafusion-examples/examples/advanced_parquet_index.rs | 6 +++--- datafusion/datasource/src/mod.rs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/datafusion-examples/examples/advanced_parquet_index.rs b/datafusion-examples/examples/advanced_parquet_index.rs index cbe0545017c5..55400e219283 100644 --- a/datafusion-examples/examples/advanced_parquet_index.rs +++ b/datafusion-examples/examples/advanced_parquet_index.rs @@ -562,7 +562,7 @@ impl ParquetFileReaderFactory for CachedParquetFileReaderFactory { // for this example we ignore the partition index and metrics // but in a real system you would likely use them to report details on // the performance of the reader. - let filename = partition_file + let filename = partitioned_file .object_meta .location .parts() @@ -573,8 +573,8 @@ impl ParquetFileReaderFactory for CachedParquetFileReaderFactory { let object_store = Arc::clone(&self.object_store); let mut inner = - ParquetObjectReader::new(object_store, partition_file.object_meta.location) - .with_file_size(partition_file.object_meta.size); + ParquetObjectReader::new(object_store, partitioned_file.object_meta.location) + .with_file_size(partitioned_file.object_meta.size); if let Some(hint) = metadata_size_hint { inner = inner.with_footer_size_hint(hint) diff --git a/datafusion/datasource/src/mod.rs b/datafusion/datasource/src/mod.rs index d76e569e19f1..1f47c0983ea1 100644 --- a/datafusion/datasource/src/mod.rs +++ b/datafusion/datasource/src/mod.rs @@ -249,11 +249,11 @@ pub enum RangeCalculation { /// Calculates an appropriate byte range for reading from an object based on the /// provided metadata. /// -/// This asynchronous function examines the `FileMeta` of an object in an object store +/// This asynchronous function examines the [`PartitionedFile`] of an object in an object store /// and determines the range of bytes to be read. The range calculation may adjust /// the start and end points to align with meaningful data boundaries (like newlines). /// -/// Returns a `Result` wrapping a `RangeCalculation`, which is either a calculated byte range or an indication to terminate early. +/// Returns a `Result` wrapping a [`RangeCalculation`], which is either a calculated byte range or an indication to terminate early. /// /// Returns an `Error` if any part of the range calculation fails, such as issues in reading from the object store or invalid range boundaries. pub async fn calculate_range(