diff --git a/datafusion/expr/src/binary_rule.rs b/datafusion/expr/src/binary_rule.rs index 8f4cf3356e444..5b655502a221f 100644 --- a/datafusion/expr/src/binary_rule.rs +++ b/datafusion/expr/src/binary_rule.rs @@ -153,7 +153,7 @@ fn bitwise_coercion(left_type: &DataType, right_type: &DataType) -> Option Option bool { - matches!(t, DataType::Dictionary(_, _)) -} - /// Coercion rule for numerical types: The type that both lhs and rhs /// can be casted to for numerical calculation, while maintaining /// maximum precision @@ -585,9 +581,7 @@ fn numerical_coercion(lhs_type: &DataType, rhs_type: &DataType) -> Option all good return Some(lhs_type.clone()); } @@ -611,9 +605,7 @@ fn numerical_coercion(lhs_type: &DataType, rhs_type: &DataType) -> Option Option { - // can't compare dictionaries directly due to - // https://github.com/apache/arrow-rs/issues/1201 - if lhs_type == rhs_type && !is_dictionary(lhs_type) { + if lhs_type == rhs_type { // same type => equality is possible return Some(lhs_type.clone()); }