parquet::record::triplet

Struct TypedTripletIter

Source
pub struct TypedTripletIter<T: DataType> {
    reader: ColumnReaderImpl<T>,
    column_descr: ColumnDescPtr,
    batch_size: usize,
    max_def_level: i16,
    max_rep_level: i16,
    values: Vec<T::T>,
    def_levels: Option<Vec<i16>>,
    rep_levels: Option<Vec<i16>>,
    curr_triplet_index: usize,
    triplets_left: usize,
    has_next: bool,
}
Expand description

Internal typed triplet iterator as a wrapper for column reader (primitive leaf column), provides per-element access.

Fields§

§reader: ColumnReaderImpl<T>§column_descr: ColumnDescPtr§batch_size: usize§max_def_level: i16§max_rep_level: i16§values: Vec<T::T>§def_levels: Option<Vec<i16>>§rep_levels: Option<Vec<i16>>§curr_triplet_index: usize§triplets_left: usize§has_next: bool

Implementations§

Source§

impl<T: DataType> TypedTripletIter<T>

Source

fn new( descr: ColumnDescPtr, batch_size: usize, column_reader: ColumnReader, ) -> Self

Creates new typed triplet iterator based on provided column reader. Use batch size to specify the amount of values to buffer from column reader.

Source

pub fn column_descr(&self) -> &ColumnDescPtr

Returns column descriptor reference for the current typed triplet iterator.

Source

fn max_def_level(&self) -> i16

Returns maximum definition level for the triplet iterator (leaf column).

Source

fn max_rep_level(&self) -> i16

Returns maximum repetition level for the triplet iterator (leaf column).

Source

fn current_value(&self) -> &T::T

Returns current value. Method does not advance the iterator, therefore can be called multiple times.

Source

fn current_def_level(&self) -> i16

Returns current definition level. If field is required, then maximum definition level is returned.

Source

fn current_rep_level(&self) -> i16

Returns current repetition level. If field is required, then maximum repetition level is returned.

Source

fn has_next(&self) -> bool

Quick check if iterator has more values/levels to read. It is updated as a result of read_next method, so they are synchronized.

Source

fn read_next(&mut self) -> Result<bool>

Advances to the next triplet. Returns true, if there are more records to read, false there are no records left.

Auto Trait Implementations§

§

impl<T> !Freeze for TypedTripletIter<T>

§

impl<T> !RefUnwindSafe for TypedTripletIter<T>

§

impl<T> Send for TypedTripletIter<T>

§

impl<T> !Sync for TypedTripletIter<T>

§

impl<T> Unpin for TypedTripletIter<T>
where <T as DataType>::T: Unpin,

§

impl<T> !UnwindSafe for TypedTripletIter<T>

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> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSendSync for T