You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/05/24 13:14:33 UTC

[GitHub] [arrow-datafusion] Dandandan commented on a change in pull request #409: fix: don't duplicate existing filters

Dandandan commented on a change in pull request #409:
URL: https://github.com/apache/arrow-datafusion/pull/409#discussion_r637935409



##########
File path: datafusion/src/optimizer/filter_push_down.rs
##########
@@ -379,6 +379,11 @@ fn optimize(plan: &LogicalPlan, mut state: State) -> Result<LogicalPlan> {
                 }
 
                 if add_to_provider {
+                    // Don't add expression again if it's already present in
+                    // pushed down filters.
+                    if new_filters.iter().any(|filter| filter.eq(filter_expr)) {

Review comment:
       ```suggestion
                       if new_filters.contains(filter_expr) {
   ```
   something like this should work?




-- 
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:
users@infra.apache.org