Skip to content

Conversation

@viirya
Copy link
Member

@viirya viirya commented Mar 28, 2015

In order to solve a bug, since #5217, DataFrame now uses analyzed plan instead of logical plan. However, by doing that we can't know the logical plan of a DataFrame. But it might be still useful and important to retrieve the original logical plan in some use cases.

In this pr, we introduce the capability of retrieving original logical plan of DataFrame.

The approach is that we add an analyzed variable to LogicalPlan. Once Analyzer finishes analysis, it sets analyzed of LogicalPlan as true. In QueryExecution, we keep the original logical plan in the analyzed plan. In LogicalPlan, a method originalPlan is added to recursively replace the analyzed logical plan with original logical plan and retrieve it.

Besides the capability of retrieving original logical plan, this modification also can avoid do plan analysis if it is already analyzed.

@SparkQA
Copy link

SparkQA commented Mar 28, 2015

Test build #29348 has finished for PR 5241 at commit ee1d790.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@viirya
Copy link
Member Author

viirya commented Mar 30, 2015

Currently the option on jira is we don't need this capability to retrieve original plan for an analyzed plan. So I close this.

@viirya viirya closed this Mar 30, 2015
@viirya viirya deleted the df_originalPlan branch December 27, 2023 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants