struct InProgressDictionaryArray<K: ArrowDictionaryKeyType> {
source: Option<ArrayRef>,
len: usize,
empty_values: ArrayRef,
sources: Vec<ArrayRef>,
source_ids: HashMap<usize, usize, RandomState>,
chunks: Vec<KeyChunk<K>>,
}Fields§
§source: Option<ArrayRef>Dictionary currently selected by InProgressArray::set_source.
len: usizeNumber of output rows retained across chunks.
empty_values: ArrayRefTyped empty values array used when finishing without any rows.
sources: Vec<ArrayRef>Distinct dictionary values arrays retained by buffer identity.
source_ids: HashMap<usize, usize, RandomState>Maps each retained values Arc address to its index in sources.
chunks: Vec<KeyChunk<K>>Zero-copy key slices in output order, tagged with their values source.
Implementations§
Source§impl<K: ArrowDictionaryKeyType> InProgressDictionaryArray<K>
impl<K: ArrowDictionaryKeyType> InProgressDictionaryArray<K>
fn new(value_type: &DataType) -> Self
Sourcefn source_id(&mut self, values: ArrayRef) -> usize
fn source_id(&mut self, values: ArrayRef) -> usize
Returns a stable index for values, reusing a source when either its Arc
pointer or its backing buffer pointers match.
Sourcefn merge_sources(
sources: &[ArrayRef],
chunks: &[KeyChunk<K>],
len: usize,
) -> Result<(Vec<K::Native>, ArrayRef), ArrowError>
fn merge_sources( sources: &[ArrayRef], chunks: &[KeyChunk<K>], len: usize, ) -> Result<(Vec<K::Native>, ArrayRef), ArrowError>
Compacts referenced values and remaps source-local keys while preserving chunk order.
Equal referenced values are only deduplicated when their count would overflow
K’s key space.
Sourcefn build_nulls(chunks: &[KeyChunk<K>], len: usize) -> Option<NullBuffer>
fn build_nulls(chunks: &[KeyChunk<K>], len: usize) -> Option<NullBuffer>
Concatenates chunk validity in output order, omitting it when all keys are valid.
Trait Implementations§
Source§impl<K: ArrowDictionaryKeyType> Debug for InProgressDictionaryArray<K>
impl<K: ArrowDictionaryKeyType> Debug for InProgressDictionaryArray<K>
Source§impl<K: ArrowDictionaryKeyType> InProgressArray for InProgressDictionaryArray<K>
impl<K: ArrowDictionaryKeyType> InProgressArray for InProgressDictionaryArray<K>
Source§fn size(&self) -> usize
fn size(&self) -> usize
Estimates memory retained by the source, value arrays, key slices, and bookkeeping.
Source§fn set_source(&mut self, source: Option<ArrayRef>)
fn set_source(&mut self, source: Option<ArrayRef>)
Source§fn copy_rows(&mut self, offset: usize, len: usize) -> Result<(), ArrowError>
fn copy_rows(&mut self, offset: usize, len: usize) -> Result<(), ArrowError>
Source§fn finish(&mut self) -> Result<ArrayRef, ArrowError>
fn finish(&mut self) -> Result<ArrayRef, ArrowError>
ArrayRefSource§fn copy_rows_by_filter(
&mut self,
filter: &FilterPredicate,
) -> Result<(), ArrowError>
fn copy_rows_by_filter( &mut self, filter: &FilterPredicate, ) -> Result<(), ArrowError>
filter from the current source array. Read moreSource§fn copy_rows_by_filter_from(
&mut self,
source: ArrayRef,
filter: &FilterPredicate,
) -> Result<(), ArrowError>
fn copy_rows_by_filter_from( &mut self, source: ArrayRef, filter: &FilterPredicate, ) -> Result<(), ArrowError>
Source§fn copy_rows_by_selection(
&mut self,
selection: FilterSelection<'_>,
) -> Result<(), ArrowError>
fn copy_rows_by_selection( &mut self, selection: FilterSelection<'_>, ) -> Result<(), ArrowError>
FilterSelection from the current source array. Read more