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 2022/04/21 07:46:37 UTC

[GitHub] [arrow-datafusion] Ted-Jiang commented on a diff in pull request #2282: Enable filter pushdown when using In_list on parquet

Ted-Jiang commented on code in PR #2282:
URL: https://github.com/apache/arrow-datafusion/pull/2282#discussion_r854884822


##########
datafusion/core/src/physical_optimizer/pruning.rs:
##########
@@ -688,6 +688,29 @@ fn build_predicate_expression(
                 return Ok(unhandled);
             }
         }
+        Expr::InList {
+            expr,
+            list,
+            negated,
+        } => {
+            if !list.is_empty() {
+                let mut or_expr = if *negated {
+                    Expr::not_eq(*expr.clone(), list[0].clone())
+                } else {
+                    Expr::eq(*expr.clone(), list[0].clone())
+                };
+
+                for e in list.iter().skip(1) {

Review Comment:
   Sorry,  use this get
   ```
   error[E0593]: function is expected to take 1 argument, but it takes 2 arguments
      --> datafusion/core/src/physical_optimizer/pruning.rs:716:26
       |
   716 |                     .map(eq_fun)
       |                      --- ^^^^^^ expected function that takes 1 argument
       |                      |
       |                      required by a bound introduced by this call
   
   ```
   I try to use `fold`
   but acc must be wrapped by box.
   
   Is there a fix?



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org