arrow_array::array

Type Alias UInt32DictionaryArray

Source
pub type UInt32DictionaryArray = DictionaryArray<UInt32Type>;
Expand description

A DictionaryArray indexed by u32

§Example: Using collect


let array: UInt32DictionaryArray = vec!["a", "a", "b", "c"].into_iter().collect();
let values: Arc<dyn Array> = Arc::new(StringArray::from(vec!["a", "b", "c"]));
assert_eq!(array.keys(), &UInt32Array::from(vec![0, 0, 1, 2]));
assert_eq!(array.values(), &values);

See DictionaryArray for more information and examples

Aliased Type§

struct UInt32DictionaryArray {
    data_type: DataType,
    keys: PrimitiveArray<UInt32Type>,
    values: Arc<dyn Array>,
    is_ordered: bool,
}

Fields§

§data_type: DataType§keys: PrimitiveArray<UInt32Type>

The keys of this dictionary. These are constructed from the buffer and null bitmap of data. Also, note that these do not correspond to the true values of this array. Rather, they map to the real values.

§values: Arc<dyn Array>

Array of dictionary values (can by any DataType).

§is_ordered: bool

Values are ordered.