Github user yhuai commented on the pull request:
https://github.com/apache/spark/pull/1116#issuecomment-46519793
Let me add a short summary. So, people without the context can catch up our
changes.
* Because `executedPlan` should not be prepared for execution again, the
original change in this PR passed the `sparkPlan` and relied on
`ExplainCommand` to call `prepareForExecution` on this `sparkPlan`. The bug was
triggered when we use `EXPLAIN`. The physical plan actually executing the query
is not affected.
* `BindReferences` was causing troubles on comparing two Exchange
Operators. #1122 resolved this issue.
* Because the change made in this PR implicitly relies on `executedPlan` in
the `ExplainCommand`, the flow of the code is not quite clear. #1123 introduces
a new solution which passes a `LogicalPlan` to an `ExplainCommand` and let
`ExplainCommand` to explicitly generate the plan. With #1123, it is possible
that we can let users to see the query plan in different stages.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---