enum ParquetDecoderState {
ReadingRowGroup {
remaining_row_groups: Box<RemainingRowGroups>,
},
DecodingRowGroup {
record_batch_reader: Box<ParquetRecordBatchReader>,
remaining_row_groups: Box<RemainingRowGroups>,
},
Finished,
}Expand description
Internal state machine for the ParquetPushDecoder
Variants§
ReadingRowGroup
Waiting for data needed to decode the next RowGroup
Fields
§
remaining_row_groups: Box<RemainingRowGroups>DecodingRowGroup
The decoder is actively decoding a RowGroup
Fields
§
record_batch_reader: Box<ParquetRecordBatchReader>Current active reader
§
remaining_row_groups: Box<RemainingRowGroups>Finished
The decoder has finished processing all data
Implementations§
Source§impl ParquetDecoderState
impl ParquetDecoderState
Sourcefn try_transition(
self,
) -> Result<(Self, DecodeResult<RecordBatch>), ParquetError>
fn try_transition( self, ) -> Result<(Self, DecodeResult<RecordBatch>), ParquetError>
Current state –> next state + output
This function is called to check if the decoder has any RecordBatches
and Self::push_data is called when new data is available.
§Notes
This structure is used to reduce the indentation level of the main loop in try_build
Sourcepub fn push_data(
self,
ranges: Vec<Range<u64>>,
data: Vec<Bytes>,
) -> Result<Self, ParquetError>
pub fn push_data( self, ranges: Vec<Range<u64>>, data: Vec<Bytes>, ) -> Result<Self, ParquetError>
Push data, and transition state if needed
This should correspond to the data ranges requested by the decoder
Sourcefn buffered_bytes(&self) -> u64
fn buffered_bytes(&self) -> u64
How many bytes are currently buffered in the decoder?
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ParquetDecoderState
impl !RefUnwindSafe for ParquetDecoderState
impl Send for ParquetDecoderState
impl !Sync for ParquetDecoderState
impl Unpin for ParquetDecoderState
impl !UnwindSafe for ParquetDecoderState
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more