pub struct StructuredRowReader<'a> { /* private fields */ }
Expand description
Reads rows from ORC files to a tree of vectors (one for each column)
Wrapper for RowReader
which provides an alternative to RowReader::row_batch
and RowReader::read_into
, by returning an enum of VectorBatches whose type
is dynamically chosen based on the file’s schema.
This avoids manually casting vector::OwnedColumnVectorBatch
to
vector::StructVectorBatch
, vector::StringVectorBatch
, … before reading
its values.
Implementations§
Source§impl<'a> StructuredRowReader<'a>
impl<'a> StructuredRowReader<'a>
Sourcepub fn new(row_reader: &'a mut RowReader, size: u64) -> StructuredRowReader<'a>
pub fn new(row_reader: &'a mut RowReader, size: u64) -> StructuredRowReader<'a>
Consumes a RowReader
to return a StructuredRowReader
size
is the number of rows to read at once.
Sourcepub fn next<'b>(&'b mut self) -> Option<ColumnTree<'b>>where
'a: 'b,
pub fn next<'b>(&'b mut self) -> Option<ColumnTree<'b>>where
'a: 'b,
Returns the next batch of columns, if any.
This slightly differs from Iterator::next
as only one value can exist
at any time (because they reuse the same data buffer).
Auto Trait Implementations§
impl<'a> Freeze for StructuredRowReader<'a>
impl<'a> RefUnwindSafe for StructuredRowReader<'a>
impl<'a> Send for StructuredRowReader<'a>
impl<'a> !Sync for StructuredRowReader<'a>
impl<'a> Unpin for StructuredRowReader<'a>
impl<'a> !UnwindSafe for StructuredRowReader<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more