docs: update examples in ArrowReaderOptions to use in-memory buffers#9163
Merged
alamb merged 2 commits intoapache:mainfrom Jan 14, 2026
Merged
docs: update examples in ArrowReaderOptions to use in-memory buffers#9163alamb merged 2 commits intoapache:mainfrom
alamb merged 2 commits intoapache:mainfrom
Conversation
etseidl
approved these changes
Jan 13, 2026
Contributor
etseidl
left a comment
There was a problem hiding this comment.
Thanks @AndreaBozzo. This looks good, but I wonder if it goes a little too far 🤷
Contributor
Author
|
@etseidl Good point, as we are fine-tuning, i'm open to modify it to address maintainers feedbacks |
Contributor
|
I probably mislead @AndreaBozzo -- I defer to @etseidl 🎩 |
Contributor
Author
No man actually i have to thank you for catching up on me after last PR, i'm ok the @etseidl call if It matters
preview of |
Contributor
|
Thanks @AndreaBozzo and @alamb, I think this is good to go now. 🚀 |
Jefffrey
approved these changes
Jan 14, 2026
Contributor
|
Thanks @Jefffrey @etseidl and @AndreaBozzo 🚀 The docs are getting pretty good 📰 |
Dandandan
pushed a commit
to Dandandan/arrow-rs
that referenced
this pull request
Jan 15, 2026
…pache#9163) # Which issue does this PR close? Closes apache#9161 # Rationale for this change This PR applies the feedback from apache#9116 to make the parquet reader documentation examples more concise and easier to follow. # What changes are included in this PR? Updated 3 documentation examples in `parquet/src/arrow/arrow_reader/mod.rs`: 1. **`with_schema` example 1** - Schema mapping with timestamp 2. **`with_schema` example 2** - Dictionary encoding preservation 3. **`with_virtual_columns` example** - Virtual columns for row numbers Changes in each example: - Replaced `tempfile::tempfile()` with `Vec::new()` for in-memory buffer - Added `use bytes::Bytes;` import - Changed `ArrowWriter::try_new(file.try_clone()?, ...)` to `ArrowWriter::try_new(&mut file, ...)` - Added `let file = Bytes::from(file);` to convert buffer for reading - Added `#` prefixes to hide setup/imports in rendered docs The async example in `async_reader/mod.rs` was intentionally left unchanged since it demonstrates `tokio::fs::File` usage. # Are there any user-facing changes? No functional changes, only documentation improvements to make examples smaller and cleaner in rendered docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Which issue does this PR close?
Closes #9161
Rationale for this change
This PR applies the feedback from #9116 to make the parquet reader documentation examples more concise and easier to follow.
What changes are included in this PR?
Updated 3 documentation examples in
parquet/src/arrow/arrow_reader/mod.rs:with_schemaexample 1 - Schema mapping with timestampwith_schemaexample 2 - Dictionary encoding preservationwith_virtual_columnsexample - Virtual columns for row numbersChanges in each example:
tempfile::tempfile()withVec::new()for in-memory bufferuse bytes::Bytes;importArrowWriter::try_new(file.try_clone()?, ...)toArrowWriter::try_new(&mut file, ...)let file = Bytes::from(file);to convert buffer for reading#prefixes to hide setup/imports in rendered docsThe async example in
async_reader/mod.rswas intentionally left unchanged since it demonstratestokio::fs::Fileusage.Are there any user-facing changes?
No functional changes, only documentation improvements to make examples smaller and cleaner in rendered docs.