-
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
Add to_unoptimized_plan #3344
Add to_unoptimized_plan #3344
Conversation
cc @andygrove |
datafusion/core/src/dataframe.rs
Outdated
@@ -520,7 +520,13 @@ impl DataFrame { | |||
self.plan.schema() | |||
} | |||
|
|||
/// Return the logical plan represented by this DataFrame. | |||
/// Return the raw (i.e. unoptimized) logical plan represented by this DataFrame. | |||
pub fn to_raw_logical_plan(&self) -> LogicalPlan { |
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.
I wonder if a better name would be to_unoptimized_plan
?
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.
Sure. Do we need to specify that it is a logical as opposed to physical plan in the name?
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.
I don't think so, because the return type is LogicalPlan
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.
Sure!
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.
@andygrove Done!
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.
LGTM. Thanks @iajoiner!
Codecov Report
@@ Coverage Diff @@
## master #3344 +/- ##
=======================================
Coverage 85.49% 85.50%
=======================================
Files 294 294
Lines 54060 54064 +4
=======================================
+ Hits 46220 46225 +5
+ Misses 7840 7839 -1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Benchmark runs are scheduled for baseline = 24db13b and contender = 5bdd55b. 5bdd55b is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
* Add to_raw_logical_plan * rename the new func * change func name to to_unoptimized_plan
Which issue does this PR close?
Closes #3340.
Rationale for this change
Enable people to fetch the raw
LogicalPlan
in aDataFrame
.What changes are included in this PR?
pub fn to_raw_logical_plan(&self) -> LogicalPlan {..}
has been added together with an assertion in a test.Are there any user-facing changes?
Yes. There are no breaking changes though.