-
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 5 commits
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 | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -816,7 +816,7 @@ impl ArrowReaderMetadata { | |||||||||||||||
| /// Create [`ArrowReaderMetadata`] from the provided [`ArrowReaderOptions`] | ||||||||||||||||
| /// and [`ChunkReader`] | ||||||||||||||||
| /// | ||||||||||||||||
| /// See [`ParquetRecordBatchReaderBuilder::new_with_metadata`] for an | ||||||||||||||||
| /// Seenano parquet/src/arrow/arrow_reader/mod.rs [`ParquetRecordBatchReaderBuilder::new_with_metadata`] for an | ||||||||||||||||
| /// example of how this can be used | ||||||||||||||||
| /// | ||||||||||||||||
| /// # Notes | ||||||||||||||||
|
|
@@ -838,9 +838,7 @@ impl ArrowReaderMetadata { | |||||||||||||||
|
|
||||||||||||||||
| /// Create a new [`ArrowReaderMetadata`] from a pre-existing | ||||||||||||||||
| /// [`ParquetMetaData`] and [`ArrowReaderOptions`]. | ||||||||||||||||
| /// | ||||||||||||||||
| /// # Notes | ||||||||||||||||
| /// | ||||||||||||||||
| /// This function will not attempt to load the PageIndex if not present in the metadata, regardless | ||||||||||||||||
| /// of the settings in `options`. See [`Self::load`] to load metadata including the page index if needed. | ||||||||||||||||
| pub fn try_new(metadata: Arc<ParquetMetaData>, options: ArrowReaderOptions) -> Result<Self> { | ||||||||||||||||
|
|
@@ -978,8 +976,6 @@ pub type ParquetRecordBatchReaderBuilder<T> = ArrowReaderBuilder<SyncReader<T>>; | |||||||||||||||
|
|
||||||||||||||||
| impl<T: ChunkReader + 'static> ParquetRecordBatchReaderBuilder<T> { | ||||||||||||||||
| /// Create a new [`ParquetRecordBatchReaderBuilder`] | ||||||||||||||||
| /// | ||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this change means the old example isn't run |
||||||||||||||||
| /// ``` | ||||||||||||||||
| /// # use std::sync::Arc; | ||||||||||||||||
| /// # use bytes::Bytes; | ||||||||||||||||
| /// # use arrow_array::{Int32Array, RecordBatch}; | ||||||||||||||||
|
|
@@ -1004,7 +1000,18 @@ impl<T: ChunkReader + 'static> ParquetRecordBatchReaderBuilder<T> { | |||||||||||||||
| /// | ||||||||||||||||
| /// // Read data | ||||||||||||||||
| /// let _batch = reader.next().unwrap().unwrap(); | ||||||||||||||||
| /// ``` | ||||||||||||||||
| /// # Example | ||||||||||||||||
| /// rust,no_run | ||||||||||||||||
| /// use parquet::arrow::arrow_reader::ParquetRecordBatchReaderBuilder; | ||||||||||||||||
| /// | ||||||||||||||||
| /// let file = std::fs::File::open("data.parquet")?; | ||||||||||||||||
| /// let mut builder = ParquetRecordBatchReaderBuilder::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()); | |
| /// } |
Uh oh!
There was an error while loading. Please reload this page.