pub fn arrays_to_dictionary<Idx>(
array_datatype: &DataType,
arrays: &[Option<(Idx, &(dyn Array + 'static))>]
) -> 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.