pub fn dictionary_coercion(lhs_type: &DataType, rhs_type: &DataType) -> Result<DataType> {
    match (lhs_type, rhs_type) {
        (
            DataType::Dictionary(_lhs_index_type, lhs_value_type),
            DataType::Dictionary(_rhs_index_type, rhs_value_type),
        ) => dictionary_value_coercion(lhs_value_type, rhs_value_type),
        (DataType::Dictionary(_index_type, value_type), _) => {
            dictionary_value_coercion(value_type, rhs_type)
        }
        (_, DataType::Dictionary(_index_type, value_type)) => {
            dictionary_value_coercion(lhs_type, value_type)
        }
        _ => bail!("Can't construct type from {} and {}", lhs_type, rhs_type),
    }
}
/// Coercion rules for Dictionaries: the type that both lhs and rhs
/// can be casted to for the purpose of a computation.
///
/// It would likely be preferable to cast primitive values to
/// dictionaries, and thus avoid unpacking dictionary as well as doing
/// faster comparisons. However, the arrow compute kernels (e.g. eq)
/// don't have DictionaryArray support yet, so fall back to unpacking
/// the dictionaries
Coercion rules for Dictionaries: the type that both lhs and rhs
can be casted to for the purpose of a computation.

It would likely be preferable to cast primitive values to
dictionaries, and thus avoid unpacking dictionary as well as doing
faster comparisons. However, the arrow compute kernels
don't have DictionaryArray support yet, so fall back to unpacking
the dictionaries
Coercion rules for Dictionaries : the type that both lhs and rhs can be casted to for the purpose of a computation . It would likely be preferable to cast primitive values to dictionaries and thus avoid unpacking dictionary as well as doing faster comparisons . However the arrow compute kernels don ' t have DictionaryArray support yet so fall back to unpacking the dictionaries
pub fn dictionary_coercion(lhs_type: &DataType, rhs_type: &DataType) -> Result<DataType> {
    match (lhs_type, rhs_type) {
        (
            DataType::Dictionary(_lhs_index_type, lhs_value_type),
            DataType::Dictionary(_rhs_index_type, rhs_value_type),
        ) => dictionary_value_coercion(lhs_value_type, rhs_value_type),
        (DataType::Dictionary(_index_type, value_type), _) => {
            dictionary_value_coercion(value_type, rhs_type)
        }
        (_, DataType::Dictionary(_index_type, value_type)) => {
            dictionary_value_coercion(lhs_type, value_type)
        }
        _ => bail!("Can't construct type from {} and {}", lhs_type, rhs_type),
    }
}
pub fn dictionary_coercion ( lhs_type : & DataType , rhs_type : & DataType ) -> Result < DataType > { match ( lhs_type , rhs_type ) { ( DataType :: Dictionary ( _lhs_index_type , lhs_value_type ) , DataType :: Dictionary ( _rhs_index_type , rhs_value_type ) , ) => dictionary_value_coercion ( lhs_value_type , rhs_value_type ) , ( DataType :: Dictionary ( _index_type , value_type ) , _ ) => { dictionary_value_coercion ( value_type , rhs_type ) } ( _ , DataType :: Dictionary ( _index_type , value_type ) ) => { dictionary_value_coercion ( lhs_type , value_type ) } _ => bail ! ( " " lhs_type rhs_type ) , } }
Coercion rules for Dictionaries: the type that both lhs and rhs
can be casted to for the purpose of a computation.
Coercion rules for Dictionaries : the type that both lhs and rhs can be casted to for the purpose of a computation .
lhs_type
&DataType
rhs_type
&DataType
lhs_type
&DataType
rhs_type
&DataType