pub struct GenericColumnReader<R, D, V> { /* private fields */ }Expand description
Reads data for a given column chunk, using the provided decoders:
- R:
ColumnLevelDecoderused to decode repetition levels - D:
ColumnLevelDecoderused to decode definition levels - V:
ColumnValueDecoderused to decode value data
Implementations§
Source§impl<V> GenericColumnReader<RepetitionLevelDecoderImpl, DefinitionLevelDecoderImpl, V>where
V: ColumnValueDecoder,
impl<V> GenericColumnReader<RepetitionLevelDecoderImpl, DefinitionLevelDecoderImpl, V>where
V: ColumnValueDecoder,
Sourcepub fn new(descr: ColumnDescPtr, page_reader: Box<dyn PageReader>) -> Self
pub fn new(descr: ColumnDescPtr, page_reader: Box<dyn PageReader>) -> Self
Creates new column reader based on column descriptor and page reader.
Source§impl<R, D, V> GenericColumnReader<R, D, V>where
R: RepetitionLevelDecoder,
D: DefinitionLevelDecoder,
V: ColumnValueDecoder,
impl<R, D, V> GenericColumnReader<R, D, V>where
R: RepetitionLevelDecoder,
D: DefinitionLevelDecoder,
V: ColumnValueDecoder,
Sourcepub fn read_records(
&mut self,
max_records: usize,
def_levels: Option<&mut D::Buffer>,
rep_levels: Option<&mut R::Buffer>,
values: &mut V::Buffer,
) -> Result<(usize, usize, usize)>
pub fn read_records( &mut self, max_records: usize, def_levels: Option<&mut D::Buffer>, rep_levels: Option<&mut R::Buffer>, values: &mut V::Buffer, ) -> Result<(usize, usize, usize)>
Read up to max_records whole records, returning the number of complete
records, non-null values and levels decoded. All levels for a given record
will be read, i.e. the next repetition level, if any, will be 0
If the max definition level is 0, def_levels will be ignored and the number of records,
non-null values and levels decoded will all be equal, otherwise def_levels will be
populated with the number of levels read, with an error returned if it is None.
If the max repetition level is 0, rep_levels will be ignored and the number of records
and levels decoded will both be equal, otherwise rep_levels will be populated with
the number of levels read, with an error returned if it is None.
values will be contiguously populated with the non-null values. Note that if the column
is not required, this may be less than either max_records or the number of levels read