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/06/14 09:21:20 UTC

[GitHub] [arrow-datafusion] Ted-Jiang commented on a diff in pull request #2729: Filter push down need consider alias columns

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


##########
datafusion/optimizer/src/filter_push_down.rs:
##########
@@ -336,6 +357,18 @@ fn optimize(plan: &LogicalPlan, mut state: State) -> Result<LogicalPlan> {
         LogicalPlan::Analyze { .. } => push_down(&state, plan),
         LogicalPlan::Filter(Filter { input, predicate }) => {
             let mut predicates = vec![];
+            let mut alias_cols_expr_and_name = HashMap::new();
+            //Need rewrite column name before push down
+            let input_plan = &*input.clone();
+            if let LogicalPlan::Projection(projection) = input_plan {

Review Comment:
   I think i should get all `Expr::Alias`, not only one levelšŸ¤”



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