jayzhan211 commented on code in PR #8496:
URL: https://github.com/apache/arrow-datafusion/pull/8496#discussion_r1423283398
##########
datafusion/physical-expr/src/expressions/binary.rs:
##########
@@ -557,18 +557,16 @@ impl BinaryExpr {
match &self.op {
IsDistinctFrom | IsNotDistinctFrom | Lt | LtEq | Gt | GtEq | Eq |
NotEq
| Plus | Minus | Multiply | Divide | Modulo => unreachable!(),
- And => {
- if left_data_type == &DataType::Boolean {
- boolean_op!(&left, &right, and_kleene)
- } else {
- internal_err!(
- "Cannot evaluate binary expression {:?} with types
{:?} and {:?}",
- self.op,
- left.data_type(),
- right.data_type()
- )
- }
- }
+ And => match left_data_type {
+ DataType::Boolean => boolean_op!(&left, &right, and_kleene),
+ DataType::List(_field) => array_intersect(&[left, right]),
Review Comment:
I think this is a good suggestion. Like what we have done for MakeArry in
`sql_array_literal`. I think we can do the similar conversion for other List
operator in sql to logicExpr stage. Including array_concat, append prepend,
array_has
--
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]