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 2020/12/14 07:53:03 UTC

[GitHub] [arrow] jorgecarleitao commented on a change in pull request #8903: ARROW-9771: [Rust] [DataFusion] treat predicates separated by AND separately in predicate pushdown

jorgecarleitao commented on a change in pull request #8903:
URL: https://github.com/apache/arrow/pull/8903#discussion_r542175604



##########
File path: rust/datafusion/src/optimizer/filter_push_down.rs
##########
@@ -215,13 +215,38 @@ fn issue_filters(
     push_down(&state, &plan)
 }
 
+/// converts "A AND B AND C" => [A, B, C]
+fn split_members(predicate: &Expr) -> Vec<&Expr> {
+    match predicate {
+        Expr::BinaryExpr {
+            right,
+            op: Operator::And,
+            left,
+        } => {
+            let mut a = split_members(&left);
+            a.extend(split_members(&right));

Review comment:
       Thanks @Dandandan . This is likely a small performance issue given that it does not affect execution, but I addressed it anyways.




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