liukun4515 commented on code in PR #2809:
URL: https://github.com/apache/arrow-datafusion/pull/2809#discussion_r912421384
##########
datafusion/physical-expr/src/expressions/in_list.rs:
##########
@@ -163,16 +139,14 @@ macro_rules! make_contains_primitive {
ColumnarValue::Scalar(s) => match s {
ScalarValue::$SCALAR_VALUE(Some(v)) => Some(*v),
ScalarValue::$SCALAR_VALUE(None) => None,
- // TODO this is bug, for primitive the expr list should be
cast to the same data type
- ScalarValue::Utf8(None) => None,
- datatype => unimplemented!("Unexpected type {} for
InList", datatype),
+ datatype => unreachable!("InList can't reach other data
type {} for {}.", datatype, s),
},
ColumnarValue::Array(_) => {
unimplemented!("InList does not yet support nested
columns.")
}
})
.collect::<Vec<_>>();
-
+ // TODO do we need to replace this below logic by `in_list_primitive`?
Review Comment:
> I reviewed the logic below and it looked correct to me -- are you asking
about the trying to refactor to reduce duplication?
Yes, I want to replace the logic in the `in_list_primitive` by the macro
`collection_contains_check`.
I will replace the duplicated code in the in_list_primitive.
--
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]