viirya commented on code in PR #5151:
URL: https://github.com/apache/arrow-datafusion/pull/5151#discussion_r1094981219
##########
datafusion/expr/src/type_coercion/binary.rs:
##########
@@ -439,6 +448,12 @@ fn both_numeric_or_null_and_numeric(lhs_type: &DataType,
rhs_type: &DataType) ->
match (lhs_type, rhs_type) {
(_, DataType::Null) => is_numeric(lhs_type),
(DataType::Null, _) => is_numeric(rhs_type),
+ (DataType::Dictionary(_, value_type), _) => {
+ is_numeric(value_type) && is_numeric(rhs_type)
+ }
+ (_, DataType::Dictionary(_, value_type)) => {
Review Comment:
Actually I'm wondering what Dictionary for `ScalaValue`(rhs here) means
although I have seen DataFusion has it.
It sounds reasonable to add the following:
```
(DataType::Dictionary(_, lhs_value_type), DataType::Dictionary(_,
rhs_value_type2)) => {
is_numeric(lhs_value_type) && is_numeric(rhs_value_type2)
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]