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/arrow-rs.git
The following commit(s) were added to refs/heads/main by this push:
new 5e6c19a21d Improve documentation for AsyncFileReader::get_metadata
(#7380)
5e6c19a21d is described below
commit 5e6c19a21d308bd9892d013835c6fbefb4fc37c0
Author: Andrew Lamb <[email protected]>
AuthorDate: Fri Apr 4 18:27:32 2025 -0400
Improve documentation for AsyncFileReader::get_metadata (#7380)
* Improve documentation for AsyncFileReader::get_metadata
* Update parquet/src/arrow/async_reader/mod.rs
Co-authored-by: Ed Seidl <[email protected]>
* Update parquet/src/arrow/async_reader/mod.rs
Co-authored-by: Ed Seidl <[email protected]>
* Update parquet/src/arrow/async_reader/mod.rs
Co-authored-by: Ed Seidl <[email protected]>
---------
Co-authored-by: Ed Seidl <[email protected]>
---
parquet/src/arrow/async_reader/mod.rs | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/parquet/src/arrow/async_reader/mod.rs
b/parquet/src/arrow/async_reader/mod.rs
index 6ce33c784e..cbbb6c4150 100644
--- a/parquet/src/arrow/async_reader/mod.rs
+++ b/parquet/src/arrow/async_reader/mod.rs
@@ -97,10 +97,22 @@ pub trait AsyncFileReader: Send {
.boxed()
}
- /// Provides asynchronous access to the [`ParquetMetaData`] of a parquet
file,
- /// allowing fine-grained control over how metadata is sourced, in
particular allowing
- /// for caching, pre-fetching, catalog metadata, etc...
- /// ArrowReaderOptions may be provided to supply decryption parameters
+ /// Return a future which results in the [`ParquetMetaData`] for this
Parquet file.
+ ///
+ /// This is an asynchronous operation as it may involve reading the file
+ /// footer and potentially other metadata from disk or a remote source.
+ ///
+ /// Reading data from Parquet requires the metadata to understand the
+ /// schema, row groups, and location of pages within the file. This
metadata
+ /// is stored primarily in the footer of the Parquet file, and can be read
using
+ /// [`ParquetMetaDataReader`].
+ ///
+ /// However, implementations can significantly speed up reading Parquet by
+ /// supplying cached metadata or pre-fetched metadata via this API.
+ ///
+ /// # Parameters
+ /// * `options`: Optional [`ArrowReaderOptions`] that may contain
decryption
+ /// and other options that affect how the metadata is read.
fn get_metadata<'a>(
&'a mut self,
options: Option<&'a ArrowReaderOptions>,