fn unpack_dictionary<K>(
    keys: &PrimitiveArray<K>,
    values: &dyn Array,
    to_type: &DataType,
) -> Result<Box<dyn Array>>
where
    K: DictionaryKey,
{
    // attempt to cast the dict values to the target type
    // use the take kernel to expand out the dictionary
    let values = cast(values, to_type)?;

    // take requires first casting i32
    let indices = cast_typed_primitive::<_, i32>(keys, &DataType::UInt32);

    take(values.as_ref(), &indices)
}
// Unpack a dictionary where the keys are of type <K> into a flattened array of type to_type
Unpack a dictionary where the keys are of type  into a flattened array of type to_type
Unpack a dictionary where the keys are of type into a flattened array of type to_type
fn unpack_dictionary<K>(
    keys: &PrimitiveArray<K>,
    values: &dyn Array,
    to_type: &DataType,
) -> Result<Box<dyn Array>>
where
    K: DictionaryKey,
{
    // attempt to cast the dict values to the target type
    // use the take kernel to expand out the dictionary
    let values = cast(values, to_type)?;
    // take requires first casting i32
    let indices = cast_typed_primitive::<_, i32>(keys, &DataType::UInt32);
    take(values.as_ref(), &indices)
}
fn unpack_dictionary < K > ( keys : & PrimitiveArray < K > , values : & dyn Array , to_type : & DataType , ) -> Result < Box < dyn Array > > where K : DictionaryKey , { // attempt to cast the dict values to the target type // use the take kernel to expand out the dictionary let values = cast ( values , to_type ) ? ; // take requires first casting i32 let indices = cast_typed_primitive :: < _ , i32 > ( keys , & DataType :: UInt32 ) ; take ( values . as_ref ( ) , & indices ) }
Unpack a dictionary where the keys are of type <K> into a flattened array of type to_type
Unpack a dictionary where the keys are of type <K > into a flattened array of type to_type
keys
&PrimitiveArray<K>
values
&dyn Array
to_type
&DataType
keys
&PrimitiveArray<K>
values
&dyn Array
to_type
&DataType