GitHub user cloud-fan opened a pull request:
https://github.com/apache/spark/pull/12810
[SPARK-15029] improve error message for Generate
## What changes were proposed in this pull request?
This PR improve the error message for `Generate` in 3 cases:
1. generator is nested in expressions, e.g. `SELECT explode(list) + 1 FROM
tbl`
2. generator appears more than one time in SELECT, e.g. `SELECT
explode(list), explode(list) FROM tbl`
3. generator appears in other operator which is not project, e.g. `SELECT *
FROM tbl SORT BY explode(list)`
## How was this patch tested?
new tests in `AnalysisErrorSuite`
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/cloud-fan/spark bug
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/12810.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 #12810
----
commit 22f03029239b119da2c14faf525c660f02d01f72
Author: Wenchen Fan <[email protected]>
Date: 2016-04-30T07:35:45Z
improve error message for Generate
----
---
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]