tustvold commented on code in PR #4679:
URL: https://github.com/apache/arrow-datafusion/pull/4679#discussion_r1054326518
##########
datafusion/core/src/dataframe.rs:
##########
@@ -505,17 +505,40 @@ impl DataFrame {
self.plan.schema()
}
- /// Return the unoptimized logical plan represented by this DataFrame.
+ /// Return the unoptimized logical plan
+ pub fn logical_plan(&self) -> &LogicalPlan {
+ &self.plan
+ }
+
+ /// Return the logical plan represented by this DataFrame without running
the optimizers
+ ///
+ /// Note: This method should not be used outside testing, as it loses the
snapshot
+ /// of the [`SessionState`] attached to this [`DataFrame`] and
consequently subsequent
+ /// operations may take place against a different state
pub fn to_unoptimized_plan(self) -> LogicalPlan {
self.plan
}
/// Return the optimized logical plan represented by this DataFrame.
- pub fn to_logical_plan(self) -> Result<LogicalPlan> {
+ ///
+ /// Note: This method should not be used outside testing, as it loses the
snapshot
+ /// of the [`SessionState`] attached to this [`DataFrame`] and
consequently subsequent
+ /// operations may take place against a different state
+ pub fn to_optimized_plan(self) -> Result<LogicalPlan> {
Review Comment:
I eventually hope to make optimisation consuming, so this is just laying the
groundwork for that - https://github.com/apache/arrow-datafusion/issues/4627
--
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]