Function re_chunk::util::arrays_to_dictionary
source · pub fn arrays_to_dictionary<Idx: Copy + Eq>(
array_datatype: &DataType,
arrays: &[Option<(Idx, &dyn ArrowArray)>]
) -> Option<DictionaryArray<i32>>
Expand description
Create a sparse dictionary-array out of an array of (potentially) duplicated arrays.
The Idx
is used as primary key to drive the deduplication process.
Returns None
if any of the specified arrays
doesn’t match the given array_datatype
.
Returns an empty dictionary if arrays
is empty.