alamb opened a new issue, #10465:
URL: https://github.com/apache/datafusion/issues/10465
Ah, I think you are asking about getting `LogicalPlan` from
`Arc<LogicalPlan>`
One way to do it today is using `unwrap_arc` (source below) which will only
copy when necessary
```rust
// the builder accepts LogicalPlan only, so a clone needed
let mut builder = LogicalPlanBuilder::from(unwrap_arc(plan));
// making an aggregate plan
builder.aggregate(..);
// this will call Arc::new() on the LogicalPlan contained.
```
https://github.com/apache/datafusion/blob/1eff714ef8356dc305047386ba250b62bed6a795/datafusion/expr/src/logical_plan/tree_node.rs#L368
Separately, adding an `LogicalPlanBuilder::from(input_plan_arc)` would be a
great idea. I'll file a ticket about doing so
_Originally posted by @alamb in
https://github.com/apache/datafusion/pull/10460#discussion_r1597600173_
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]