Dandandan commented on code in PR #20428:
URL: https://github.com/apache/datafusion/pull/20428#discussion_r2831852295
##########
datafusion/physical-expr/src/expressions/in_list.rs:
##########
@@ -773,11 +774,23 @@ impl PhysicalExpr for InListExpr {
None => {
// No static filter: iterate through each expression, compare,
and OR results
let value = value.into_array(num_rows)?;
- let found = self.list.iter().map(|expr|
expr.evaluate(batch)).try_fold(
- BooleanArray::new(BooleanBuffer::new_unset(num_rows),
None),
- |result, expr| -> Result<BooleanArray> {
- let rhs = match expr? {
- ColumnarValue::Array(array) => {
+ let use_arrow_eq = !value.data_type().is_nested();
+ let mut found =
Review Comment:
Instead of setting allocating the first to all -false (i.e. extra allocation
/ memset), it could initialize the first separately.
--
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]