erratic-pattern commented on code in PR #10221:
URL: https://github.com/apache/datafusion/pull/10221#discussion_r1578804434
##########
datafusion/expr/src/type_coercion/binary.rs:
##########
@@ -643,9 +643,8 @@ fn dictionary_coercion(
Dictionary(_lhs_index_type, lhs_value_type),
Dictionary(_rhs_index_type, rhs_value_type),
) => comparison_coercion(lhs_value_type, rhs_value_type),
- (d @ Dictionary(_, value_type), other_type)
- | (other_type, d @ Dictionary(_, value_type))
- if preserve_dictionaries && value_type.as_ref() == other_type =>
+ (d @ Dictionary(_, _), other_type) | (other_type, d @ Dictionary(_, _))
+ if preserve_dictionaries && can_cast_types(other_type, d) =>
Review Comment:
@jayzhan211 Thanks for the tip. I initially avoiding calling
`comparison_coercion` because the way I was doing it would cause an infinite
recursion, but calling `comparison_coercion` on the inner value type and then
wrapping in a new `Dictionary` as you suggested solves that issue.
I was hoping this would fix the test failure, but unfortunately it does not
so I will need to look into reworking the type coercion logic for
`VariadicEqual` functions
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]