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



##########
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:
       Thanks @Dandandan, I completely forgot about `contains` on `Vec`.




-- 
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]


Reply via email to