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§
Trait Implementations§
Source§impl<T: DataType> ColumnValueEncoder for ColumnValueEncoderImpl<T>
impl<T: DataType> ColumnValueEncoder for ColumnValueEncoderImpl<T>
Source§fn flush_bloom_filter(&mut self) -> Option<Sbbf>
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>
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<()>
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<()>
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
fn num_values(&self) -> usize
Returns the number of buffered values
Source§fn has_dictionary(&self) -> bool
fn has_dictionary(&self) -> bool
Returns true if this encoder has a dictionary page
Source§fn estimated_memory_size(&self) -> usize
fn estimated_memory_size(&self) -> usize
Returns the estimated total memory usage of the encoder
Source§fn estimated_dict_page_size(&self) -> Option<usize>
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 dictionarySource§fn estimated_data_page_size(&self) -> usize
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>>
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 moreSource§fn flush_data_page(&mut self) -> Result<DataPageValues<T::T>>
fn flush_data_page(&mut self) -> Result<DataPageValues<T::T>>
Flush the next data page for this column chunk
Auto Trait Implementations§
impl<T> Freeze for ColumnValueEncoderImpl<T>
impl<T> !RefUnwindSafe for ColumnValueEncoderImpl<T>
impl<T> Send for ColumnValueEncoderImpl<T>
impl<T> !Sync for ColumnValueEncoderImpl<T>
impl<T> Unpin for ColumnValueEncoderImpl<T>
impl<T> !UnwindSafe for ColumnValueEncoderImpl<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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