GitHub user cloud-fan opened a pull request:
https://github.com/apache/spark/pull/11521
[SPARK-13678][SQL] transformExpressions should only apply on
QueryPlan.expressions
## What changes were proposed in this pull request?
Similar to `TreeNode.transform`, which only apply the rule on its children,
`QueryPlan.transformExpressions` should also only apply the rule on its
expressions(i.e. returned by `Query.expressions`). I think it's more intuitive
to exclude the expressions that are not defined as this plan's expressions, for
example, `Generate.generatorOutput` should not be touched by
`transformExpressions`.
This PR also did some renaming in `TreeNode` to make the code more
readable, and removed the analyzer trick for `Generate`.
## How was this patch tested?
existing tests.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/cloud-fan/spark transfromExpr
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/11521.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #11521
----
commit 31c534403d119b431cb6d493d5acc50db2ac73a6
Author: Wenchen Fan <[email protected]>
Date: 2016-03-04T12:58:15Z
transformExpressions should exclude expression that is not inside
QueryPlan.expressions
----
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]