ygf11 commented on code in PR #4862: URL: https://github.com/apache/arrow-datafusion/pull/4862#discussion_r1067929192
########## datafusion/expr/src/expr_rewriter.rs: ########## @@ -525,29 +525,55 @@ pub fn coerce_plan_expr_for_schema( plan: &LogicalPlan, schema: &DFSchema, ) -> Result<LogicalPlan> { - let new_expr = plan - .expressions() - .into_iter() + match plan { + LogicalPlan::Projection(Projection { expr, input, .. }) => { Review Comment: Yes, it is to avoid adding multiple projections. -- 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-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org