parquet::column::writer::encoder

Struct ColumnValueEncoderImpl

Source
pub struct ColumnValueEncoderImpl<T: DataType> {
    encoder: Box<dyn Encoder<T>>,
    dict_encoder: Option<DictEncoder<T>>,
    descr: ColumnDescPtr,
    num_values: usize,
    statistics_enabled: EnabledStatistics,
    min_value: Option<T::T>,
    max_value: Option<T::T>,
    bloom_filter: Option<Sbbf>,
    variable_length_bytes: Option<i64>,
}

Fields§

§encoder: Box<dyn Encoder<T>>§dict_encoder: Option<DictEncoder<T>>§descr: ColumnDescPtr§num_values: usize§statistics_enabled: EnabledStatistics§min_value: Option<T::T>§max_value: Option<T::T>§bloom_filter: Option<Sbbf>§variable_length_bytes: Option<i64>

Implementations§

Source§

impl<T: DataType> ColumnValueEncoderImpl<T>

Source

fn min_max( &self, values: &[T::T], value_indices: Option<&[usize]>, ) -> Option<(T::T, T::T)>

Source

fn write_slice(&mut self, slice: &[T::T]) -> Result<()>

Trait Implementations§

Source§

impl<T: DataType> ColumnValueEncoder for ColumnValueEncoderImpl<T>

Source§

type T = <T as DataType>::T

The underlying value type of Self::Values Read more
Source§

type Values = [<T as DataType>::T]

The values encoded by this encoder
Source§

fn flush_bloom_filter(&mut self) -> Option<Sbbf>

Flushes bloom filter if enabled and returns it, otherwise returns None. Subsequent writes will not be tracked by the bloom filter as it is empty since. This should be called once near the end of encoding.
Source§

fn try_new(descr: &ColumnDescPtr, props: &WriterProperties) -> Result<Self>

Create a new ColumnValueEncoder
Source§

fn write(&mut self, values: &[T::T], offset: usize, len: usize) -> Result<()>

Write the corresponding values to this ColumnValueEncoder
Source§

fn write_gather( &mut self, values: &Self::Values, indices: &[usize], ) -> Result<()>

Write the values at the indexes in indices to this ColumnValueEncoder
Source§

fn num_values(&self) -> usize

Returns the number of buffered values
Source§

fn has_dictionary(&self) -> bool

Returns true if this encoder has a dictionary page
Source§

fn estimated_memory_size(&self) -> usize

Returns the estimated total memory usage of the encoder
Source§

fn estimated_dict_page_size(&self) -> Option<usize>

Returns an estimate of the encoded size of dictionary page size in bytes, or None if no dictionary
Source§

fn estimated_data_page_size(&self) -> usize

Returns an estimate of the encoded data page size in bytes Read more
Source§

fn flush_dict_page(&mut self) -> Result<Option<DictionaryPage>>

Flush the dictionary page for this column chunk if any. Any subsequent calls to Self::write will not be dictionary encoded Read more
Source§

fn flush_data_page(&mut self) -> Result<DataPageValues<T::T>>

Flush the next data page for this column chunk

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

§

impl<T> MaybeSendSync for T