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:
[email protected]


Reply via email to