GitHub user gatorsmile opened a pull request:
https://github.com/apache/spark/pull/11198
[SPARK-13310] [SQL] Resolve Missing Sorting Columns in Generate
```scala
// case 1: missing sort columns are resolvable if join is true
sql("SELECT explode(a) AS val, b FROM data WHERE b < 2 order by val, c")
// case 2: missing sort columns are not resolvable if join is false. Thus,
issue an error message in this case
sql("SELECT explode(a) AS val FROM data order by val, c")
```
When sort columns are not in `Generate`, we can resolve them when `join` is
equal to `true`. Still trying to add more test cases for the other `UnaryNode`
types.
Could you review the changes? @davies @cloud-fan Thanks!
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/gatorsmile/spark missingInSort
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/11198.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 #11198
----
commit 0f4cbdced54349e5c3af8aa8b3dc509561700fe3
Author: gatorsmile <[email protected]>
Date: 2016-02-14T00:37:31Z
resolve missing sorting columns in Generate
commit c74e7b911abc1e420f9d2bd775c7b02fb6cf3079
Author: gatorsmile <[email protected]>
Date: 2016-02-14T00:48:41Z
style fix.
----
---
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]