andygrove commented on a change in pull request #8746:
URL: https://github.com/apache/arrow/pull/8746#discussion_r528910229
##########
File path: rust/datafusion/src/optimizer/filter_push_down.rs
##########
@@ -93,7 +93,9 @@ fn issue_filters(
let predicate = predicates
.iter()
.skip(1)
- .fold(predicates[0].clone(), |acc, predicate| and(&acc, predicate));
+ .fold(predicates[0].clone(), |acc, predicate| {
+ and(acc, (*predicate).clone())
Review comment:
This is just cloning rather than using a reference when creating the
`and` expression. `predicate` is `&&Expr` so I dereference with `*` to get
`&Expr` and then clone (perhaps could be `to_owned` instead).
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]