avantgardnerio commented on code in PR #2885: URL: https://github.com/apache/arrow-datafusion/pull/2885#discussion_r925859944
########## datafusion/expr/src/logical_plan/plan.rs: ########## @@ -1074,6 +1074,13 @@ impl Projection { alias, }) } + + pub fn try_from_plan(plan: &LogicalPlan) -> datafusion_common::Result<&Projection> { Review Comment: I started with that, but ran into borrow checker / trait issues with returning a reference, vs cloning the underlying data (I'm sure I could have gotten it to work with a clone). I was thinking that maybe this method should be called `try_from_plan_ref` in order to differentiate it from any future non-ref version. 50% of this PR was just trying to de-verbosify those plan re-writers into something that was readable and fit on a page. -- 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