Skip to content

Convert internal representation of LogicalPlanBuilder from LogicalPlan to Arc<LogicalPlan> #10485

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
alamb opened this issue May 13, 2024 · 4 comments · Fixed by #12040
Closed
Assignees
Labels
good first issue Good for newcomers

Comments

@alamb
Copy link
Contributor

alamb commented May 13, 2024

          Great idea @ClSlaid 

Thanks to @AbrarNitk we have a first version of LogicalPlanBuilder::from(arc_input) in #10466 🙏

Now that we have merged that PR we can make a second PR (and maybe a second ticket) about switching the internal representation from

#[derive(Debug, Clone)]
pub struct LogicalPlanBuilder {
plan: LogicalPlan,
}

To

 pub struct LogicalPlanBuilder { 
     plan: Arc<LogicalPlan>, 
 } 

The rationale is as explained by @ClSlaid on #10465 (comment) -- that in some cases this can prevent cloning the input

Originally posted by @alamb in #10465 (comment)

@alamb alamb added the good first issue Good for newcomers label May 13, 2024
@alamb
Copy link
Contributor Author

alamb commented May 13, 2024

I think this is a good first issue as it is pretty clear what the ask is

@iiiancampbell
Copy link

take

iiiancampbell added a commit to iiiancampbell/datafusion that referenced this issue May 13, 2024
Converted internal representation of LogicalPlanBuilder from LogicalPlan to Arc<LogicalPlan> apache#10485
@alamb
Copy link
Contributor Author

alamb commented May 13, 2024

Awesome -- thank you @iiiancampbell 🎉

@jc4x4
Copy link
Contributor

jc4x4 commented Aug 16, 2024

I noticed the previous commit is stale and closed. Here is my first attempt.
#12040

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment