struct DictEncoder {
interner: ByteArrayInterner,
indices: Vec<u64>,
variable_length_bytes: i64,
dictionary_cache: Option<DictionaryCache>,
}Expand description
A dictionary encoder for byte array data
Fields§
§interner: ByteArrayInterner§indices: Vec<u64>§variable_length_bytes: i64§dictionary_cache: Option<DictionaryCache>The interned index of each value of the last arrow dictionary encoded
Implementations§
Source§impl DictEncoder
impl DictEncoder
Sourcefn encode<T>(&mut self, values: T, indices: &[usize]) -> Result<()>
fn encode<T>(&mut self, values: T, indices: &[usize]) -> Result<()>
Encode values to the in-progress page
Sourcefn use_dictionary_cache(&self, dictionary: &ArrayRef, num_rows: usize) -> bool
fn use_dictionary_cache(&self, dictionary: &ArrayRef, num_rows: usize) -> bool
Whether to encode the rows of an arrow dictionary with dictionary as its values and
num_rows rows with Self::encode_dictionary
Sourcefn encode_dictionary<'a, K, V>(
&mut self,
values: TypedDictionaryArray<'a, K, V>,
indices: &[usize],
dictionary: &ArrayRef,
) -> Result<()>
fn encode_dictionary<'a, K, V>( &mut self, values: TypedDictionaryArray<'a, K, V>, indices: &[usize], dictionary: &ArrayRef, ) -> Result<()>
Encode the rows of an arrow dictionary at indices to the in-progress page
fn bit_width(&self) -> u8
fn estimated_memory_size(&self) -> usize
fn estimated_data_page_size(&self) -> usize
fn estimated_dict_page_size(&self) -> usize
fn flush_dict_page(self) -> DictionaryPage
fn flush_data_page( &mut self, min_value: Option<ByteArray>, max_value: Option<ByteArray>, ) -> DataPageValues<ByteArray>
Trait Implementations§
Source§impl Debug for DictEncoder
impl Debug for DictEncoder
Auto Trait Implementations§
impl !RefUnwindSafe for DictEncoder
impl !UnwindSafe for DictEncoder
impl Forget for DictEncoder
impl Freeze for DictEncoder
impl Move for DictEncoder
impl Send for DictEncoder
impl Sync for DictEncoder
impl Unpin for DictEncoder
impl UnsafeUnpin for DictEncoder
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