parquet::column::reader::decoder

Struct RepetitionLevelDecoderImpl

Source
pub struct RepetitionLevelDecoderImpl {
    decoder: Option<LevelDecoder>,
    bit_width: u8,
    buffer: Box<[i16; 1024]>,
    buffer_len: usize,
    buffer_offset: usize,
    has_partial: bool,
}
Expand description

An implementation of RepetitionLevelDecoder for [i16]

Fields§

§decoder: Option<LevelDecoder>§bit_width: u8§buffer: Box<[i16; 1024]>§buffer_len: usize§buffer_offset: usize§has_partial: bool

Implementations§

Source§

impl RepetitionLevelDecoderImpl

Source

pub fn new(max_level: i16) -> Self

Source

fn fill_buf(&mut self) -> Result<()>

Source

fn count_records( &mut self, records_to_read: usize, num_levels: usize, ) -> (bool, usize, usize)

Inspects the buffered repetition levels in the range self.buffer_offset..self.buffer_len and returns the number of “complete” records along with the corresponding number of values

A “complete” record is one where the buffer contains a subsequent repetition level of 0

Trait Implementations§

Source§

impl ColumnLevelDecoder for RepetitionLevelDecoderImpl

Source§

type Buffer = Vec<i16>

Source§

fn set_data(&mut self, encoding: Encoding, data: Bytes)

Set data for this ColumnLevelDecoder
Source§

impl RepetitionLevelDecoder for RepetitionLevelDecoderImpl

Source§

fn read_rep_levels( &mut self, out: &mut Self::Buffer, num_records: usize, num_levels: usize, ) -> Result<(usize, usize)>

Read up to max_records of repetition level data into out returning the number of complete records and levels read Read more
Source§

fn skip_rep_levels( &mut self, num_records: usize, num_levels: usize, ) -> Result<(usize, usize)>

Skips over up to num_levels repetition levels corresponding to num_records records, where a record is delimited by a repetition level of 0 Read more
Source§

fn flush_partial(&mut self) -> bool

Flush any partially read or skipped record

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSendSync for T