-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Implement From<Arc<LogicalPlan>>
for LogicalPlanBuilder
#10466
Conversation
From<Arc<LogicalPlan>>
for LogicalPlanBuilder
From<Arc<LogicalPlan>>
for LogicalPlanBuilder
From<Arc<LogicalPlan>>
for LogicalPlanBuilder
Thanks @AbrarNitk ! I started the CI checks on this PR Normally I think we should add some test coverage so we don't accidentally break this in the future. This would I think this could take the form of:
However, in this case perhaps I think we could simply merge this PR and then use the code in #10460 with @ClSlaid Looks like the CI failed for running Can you fix that and then we can get this PR merged? Thanks agian |
Hey @alamb, I am glad you have checked PR. I am new to |
Thank you and welcome to the community! I started CI again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @AbrarNitk -- I think this is a nice improvement and a good first contribution ❤️
Merging it in so we can potentially use it in #10460
@@ -1138,6 +1139,31 @@ impl LogicalPlanBuilder { | |||
)?)) | |||
} | |||
} | |||
|
|||
/// Converts a `Arc<LogicalPlan>` into `LogicalPlanBuilder` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI in general, the style of docs in Rust is to put them in triple quotes which will ensure they are actually run as part of the CI tests (cargo test --doc
will run them)
So in this case like
/// ```
/// fn employee_schema() -> Schema {
...
Any chance you are willing to make a follow on PR to change this to a docstring @AbrarNitk ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, I will raise another PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…0466) * implement From<Arc<LogicalPlan>> for LogicalPlanBuilder * make fmt happy * added test case and doc comment
Which issue does this PR close?
Closes #10465
Rationale for this change
What changes are included in this PR?
This PR implements
From
trait for convertingArc<LogicalPlan>
intoLogicalPlanBuilder
Are these changes tested?
Yes
Are there any user-facing changes?
No