GitHub user watermen opened a pull request:
https://github.com/apache/spark/pull/5290
[SPARK-6583][SQL] Support aggregated function in order by
Spark support the below syntax now(order by alias):
```
SELECT a, sum(b) as sum_b
FROM orderByData
GROUP BY a
ORDER BY sum_b
```
This patch is used to support the syntax below:
```
SELECT a
FROM orderByData
GROUP BY a
ORDER BY sum(b)
```
```
SELECT sum(b)
FROM orderByData
GROUP BY a
ORDER BY sum(b)
```
```
SELECT a, sum(b)
FROM orderByData
GROUP BY a
ORDER BY sum(b)
```
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/watermen/spark SPARK-6583
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/5290.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 #5290
----
commit b9b63ac5b175af17c60e97d5c6d220c55a1206c7
Author: Yadong Qi <[email protected]>
Date: 2015-03-28T08:19:49Z
Support aggregated function in order by
----
---
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]