jayzhan211 commented on issue #9637: URL: https://github.com/apache/arrow-datafusion/issues/9637#issuecomment-2012028959
I think when you rewrite inputs, you still need to call Arc::into_inner to get T: LogicalPlan without clone. And, it is where things are getting tricky. But I played around without mut before, maybe there are ways to solve this with mut. On Thu, Mar 21, 2024, 6:04 PM Andrew Lamb ***@***.***> wrote: > There is one issue that we are not able to call Arc::into_inner for > skip-failed-rules path since we hold a clone for restoration. > > What I did in #9708 <https://github.com/apache/arrow-datafusion/pull/9708> > which seems to have worked pretty well is to copy the LogicalPlan *only* > if skip_failed_rules is set > > Like this > <https://github.com/apache/arrow-datafusion/pull/9708/files#diff-42d66905c3fa6b245c3493fb4df4816e0fde3036941315ab42198fb16f3907dfR319> > > let prev_plan = if options.optimizer.skip_failed_rules { > Some(new_plan.clone()) > } else { > None > }; > > — > Reply to this email directly, view it on GitHub > <https://github.com/apache/arrow-datafusion/issues/9637#issuecomment-2011805443>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/ADZCLR2E6LQDXLPP7PW2ZJ3YZKWBJAVCNFSM6AAAAABEZIFWPOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJRHAYDKNBUGM> > . > You are receiving this because you were mentioned.Message ID: > ***@***.***> > -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
