pub fn as_dictionary_array<T: ArrowDictionaryKeyType>(
    array: &dyn Array
) -> Result<&DictionaryArray<T>>