Apache DataFusion SQL Query Engine
fix docs and broken example from #17956 (#17980)
Adrian Garcia Badaracco3b37ae06d50b
diff --git a/datafusion-examples/examples/advanced_parquet_index.rs b/datafusion-examples/examples/advanced_parquet_index.rsindex cbe0545017..55400e2192 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.rsindex d76e569e19..1f47c0983e 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(