You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "ClSlaid (via GitHub)" <gi...@apache.org> on 2024/05/12 10:04:52 UTC
Re: [I] Implement `LogicalPlanBuilder::from` for `Arc` [datafusion]
ClSlaid commented on issue #10465:
URL: https://github.com/apache/datafusion/issues/10465#issuecomment-2106192785
I suggest not call `unwrap_arc` until the built `LogicalPlan` really requires the ownership.
In most occasions, `LogicalPlan` contains an `input: Arc<LogicalPlan>`, and sometimes we will have to construct `LogicalPlanBuilder` from it. This will lead to a clone.
Meanwhile, most of the `LogicalPlan` constructed by the builder places the plan in an `Arc` again. This then causes another clone.
There must be a way to seamlessly moving the `input: Arc<LogicalPlan>` into rewritten plans, and it would be no clone in most occasions.
--
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@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org