arrow_select::dictionary

Function merge_dictionary_values

Source
pub fn merge_dictionary_values<K: ArrowDictionaryKeyType>(
    dictionaries: &[&DictionaryArray<K>],
    masks: Option<&[BooleanBuffer]>,
) -> Result<MergedDictionaries<K>, ArrowError>
Expand description

Given an array of dictionaries and an optional key mask compute a values array containing referenced values, along with mappings from the [DictionaryArray] keys to the new keys within this values array. Best-effort will be made to ensure that the dictionary values are unique

This method is meant to be very fast and the output dictionary values may not be unique, unlike GenericByteDictionaryBuilder which is slower but produces unique values