Github user chenghao-intel commented on the pull request:
https://github.com/apache/spark/pull/3964#issuecomment-69522110
The SQL enhanced aggregation syntax may looks like in HiveContext as:
```
GROUP BY expression list WITH ROLLUP
GROUP BY expression list WITH CUBE
GROUP BY expression list, GROUPING SETS (expression list2)
```
See
https://cwiki.apache.org/confluence/display/Hive/Enhanced+Aggregation,+Cube,+Grouping+and+Rollup
Currently in logical analysis and execution, we follows the Hive's
specification, however, in SQL99, it also supports the format like:
```
GROUP BY expression list, GROUPING SETS (expression list2), expression list3
GROUP BY expression list, CUBE(expression list2), expression list3
GROUP BY expression list, ROLLUP(expression list2), expression list3
```
The `grouping column reference list` is optionally required by `CUBE` and
`ROLLUP` (http://savage.net.au/SQL/sql-99.bnf.html) , and there are some
additional work need to be done on the `Logical Node` and `Analyzer` to support
the semantics like for this.
Probably we'd better implement the Hive-Like format first in SQLContext,
what do you think?
---
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]