-
Notifications
You must be signed in to change notification settings - Fork 1.1k
docs(parquet): move async parquet example into ArrowReaderBuilder docs #9167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
f9e2ea2
9a363e9
d7fd9fe
763ce0a
a842ada
0720743
8c63f25
9d1b2da
c8314cf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -1002,6 +1002,20 @@ impl<T: ChunkReader + 'static> ParquetRecordBatchReaderBuilder<T> { | |||||||||||||||
| /// // Read data | ||||||||||||||||
| /// let _batch = reader.next().unwrap().unwrap(); | ||||||||||||||||
| /// ``` | ||||||||||||||||
|
|
||||||||||||||||
|
|
||||||||||||||||
| /// # Example | ||||||||||||||||
| /// ```rust | ||||||||||||||||
| /// use parquet::arrow::arrow_reader::ArrowReaderBuilder; | ||||||||||||||||
|
||||||||||||||||
| /// # async fn example() -> parquet::errors::Result<()> { | ||||||||||||||||
| /// let file = std::fs::File::open("data.parquet")?; | ||||||||||||||||
| /// let builder = ArrowReaderBuilder::try_new(file)?; | ||||||||||||||||
| /// let mut reader = builder.build()?; | ||||||||||||||||
|
||||||||||||||||
| /// let mut reader = builder.build()?; | |
| /// let mut reader = builder.build()?; | |
| /// | |
| /// // Read all record batches from the reader | |
| /// while let Some(batch) = reader.next().transpose()? { | |
| /// println!("Read {} rows", batch.num_rows()); | |
| /// } |
Outdated
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This example is marked as async (wrapped in async fn example()) but demonstrates synchronous file reading using std::fs::File. The deleted async_read_parquet.rs example actually demonstrated async reading using tokio::fs::File and ParquetRecordBatchStreamBuilder.
If the intent is to provide an async example for ArrowReaderBuilder::try_new, it should use the async API (ParquetRecordBatchStreamBuilder) instead of the synchronous API (ParquetRecordBatchReaderBuilder). Alternatively, if this is meant to be a synchronous example, the async fn example() wrapper should be removed and replaced with a regular function.
Outdated
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra blank lines before and after the example section. Standard Rust documentation style typically uses a single blank line between doc comment sections.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hardcoded file path "data.parquet" will cause this example to fail when run via
cargo test --doc. Examples in documentation should either use files that are known to exist (like those in the test data directory), or be marked withno_runto prevent execution during doc tests.