Skip to main content

ColumnValueEncoderImpl

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>,
    nan_count: Option<u64>,
    bloom_filter: Option<Sbbf>,
    bloom_filter_target_fpp: f64,
    variable_length_bytes: Option<i64>,
    geo_stats_accumulator: Option<Box<dyn GeoStatsAccumulator>>,
}

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>§nan_count: Option<u64>§bloom_filter: Option<Sbbf>§bloom_filter_target_fpp: f64§variable_length_bytes: Option<i64>§geo_stats_accumulator: Option<Box<dyn GeoStatsAccumulator>>

Implementations§

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, column_props: &ResolvedColumnProperties, ) -> Result<Self>

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], _num_values_in_batch: usize, ) -> Result<()>

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

fn count_values_within_byte_budget( values: &[T::T], offset: usize, len: usize, byte_budget: usize, ) -> Option<usize>

Counts how many leading values in values[offset..offset + len] belong in one page of byte_budget bytes. Read more
Source§

fn count_values_within_byte_budget_gather( values: &[T::T], indices: &[usize], byte_budget: usize, ) -> Option<usize>

As Self::count_values_within_byte_budget but using gather indices rather than a contiguous range. Returns the number of indices that fit, not the maximum index value.
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 compresses_against_previous_value(&self) -> bool

Returns true if the encoder compresses each value against the value immediately before it, within the current page. Read more
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
Source§

fn flush_geospatial_statistics(&mut self) -> Option<Box<GeospatialStatistics>>

Computes [GeospatialStatistics], if any, and resets internal state such that any internal accumulator is prepared to accumulate statistics for the next column chunk.
Source§

fn max_value_bytes(_values: &Self::Values) -> Option<usize>

Returns an upper bound on the bytes that any one value of values adds to a plain-encoded page, if the encoder knows one without reading the values. Read more

Auto Trait Implementations§

§

impl<T> !RefUnwindSafe for ColumnValueEncoderImpl<T>

§

impl<T> !Sync for ColumnValueEncoderImpl<T>

§

impl<T> !UnwindSafe for ColumnValueEncoderImpl<T>

§

impl<T> Forget for ColumnValueEncoderImpl<T>

§

impl<T> Freeze for ColumnValueEncoderImpl<T>
where *const dyn Encoder<T> is !null: Freeze, PhantomData<dyn Encoder<T>>: Freeze, *const u8 is !null: Freeze, PhantomData<u64>: Freeze, PhantomData<<T as DataType>::T>: Freeze, *const ArcInner<ColumnDescriptor> is !null: Freeze, PhantomData<ArcInner<ColumnDescriptor>>: Freeze, <T as DataType>::T: Freeze, PhantomData<Block>: Freeze, *const dyn GeoStatsAccumulator is !null: Freeze, PhantomData<dyn GeoStatsAccumulator>: Freeze,

§

impl<T> Move for ColumnValueEncoderImpl<T>

§

impl<T> Send for ColumnValueEncoderImpl<T>
where BoxRaw<dyn Encoder<T>>: Send, RawTable<u64>: Send, RawVecInner: Send, <T as DataType>::T: Send, Arc<ColumnDescriptor>: Send, BoxRaw<dyn GeoStatsAccumulator>: Send,

§

impl<T> Unpin for ColumnValueEncoderImpl<T>
where Box<dyn Encoder<T>>: Unpin, *const u8 is !null: Unpin, u64: Unpin, <T as DataType>::T: Unpin, Arc<ColumnDescriptor>: Unpin, Box<dyn GeoStatsAccumulator>: Unpin,

§

impl<T> UnsafeUnpin for ColumnValueEncoderImpl<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
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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.

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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> Ungil for T
where T: Send,