Struct parquet::arrow::async_reader::ParquetRecordBatchStreamBuilder
source · [−]pub struct ParquetRecordBatchStreamBuilder<T> { /* private fields */ }
Expand description
A builder used to construct a ParquetRecordBatchStream
for a parquet file
In particular, this handles reading the parquet file metadata, allowing consumers to use this information to select what specific columns, row groups, etc… they wish to be read by the resulting stream
Implementations
sourceimpl<T: AsyncFileReader> ParquetRecordBatchStreamBuilder<T>
impl<T: AsyncFileReader> ParquetRecordBatchStreamBuilder<T>
sourcepub async fn new(input: T) -> Result<Self>
pub async fn new(input: T) -> Result<Self>
Create a new ParquetRecordBatchStreamBuilder
with the provided parquet file
sourcepub fn metadata(&self) -> &Arc<ParquetMetaData>
pub fn metadata(&self) -> &Arc<ParquetMetaData>
Returns a reference to the ParquetMetaData
for this parquet file
sourcepub fn parquet_schema(&self) -> &SchemaDescriptor
pub fn parquet_schema(&self) -> &SchemaDescriptor
Returns the parquet SchemaDescriptor
for this parquet file
sourcepub fn with_batch_size(self, batch_size: usize) -> Self
pub fn with_batch_size(self, batch_size: usize) -> Self
Set the size of RecordBatch
to produce
sourcepub fn with_row_groups(self, row_groups: Vec<usize>) -> Self
pub fn with_row_groups(self, row_groups: Vec<usize>) -> Self
Only read data from the provided row group indexes
sourcepub fn with_projection(self, mask: ProjectionMask) -> Self
pub fn with_projection(self, mask: ProjectionMask) -> Self
Only read data from the provided column indexes
sourcepub fn build(self) -> Result<ParquetRecordBatchStream<T>>
pub fn build(self) -> Result<ParquetRecordBatchStream<T>>
Build a new ParquetRecordBatchStream
Auto Trait Implementations
impl<T> RefUnwindSafe for ParquetRecordBatchStreamBuilder<T> where
T: RefUnwindSafe,
impl<T> Send for ParquetRecordBatchStreamBuilder<T> where
T: Send,
impl<T> Sync for ParquetRecordBatchStreamBuilder<T> where
T: Sync,
impl<T> Unpin for ParquetRecordBatchStreamBuilder<T> where
T: Unpin,
impl<T> UnwindSafe for ParquetRecordBatchStreamBuilder<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more