[
https://issues.apache.org/jira/browse/TAJO-1420?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14368608#comment-14368608
]
ASF GitHub Bot commented on TAJO-1420:
--------------------------------------
GitHub user dongjoon-hyun opened a pull request:
https://github.com/apache/tajo/pull/439
TAJO-1420: Support GROUPING SET syntax
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/dongjoon-hyun/tajo TAJO-1420
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/tajo/pull/439.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 #439
----
commit 3ee213d9ee20c494e655ce153101e35f9fde0043
Author: Dongjoon Hyun <[email protected]>
Date: 2015-03-19T06:47:07Z
TAJO-1420: Support GROUPING SET syntax
----
> Support GROUPING SET syntax
> ---------------------------
>
> Key: TAJO-1420
> URL: https://issues.apache.org/jira/browse/TAJO-1420
> Project: Tajo
> Issue Type: Sub-task
> Components: parser
> Affects Versions: 0.10.0
> Reporter: Dongjoon Hyun
> Assignee: Dongjoon Hyun
> Priority: Minor
> Fix For: 0.10.1
>
>
> This issue is about SQL parsing only. As of Tajo 0.10.0,
> {code:sql}
> default> create table t(a int, b int);
> OK
> default> select * from t group by cube(a,b);
> ERROR: Cube is not supported yet
> default> select * from t group by rollup(a,b);
> ERROR: Rollup is not supported yet
> default> select * from t group by grouping set(a,b);
> ERROR: syntax error at or near 'grouping'
> {code}
> The last error should be like the following.
> {code:sql}
> default> select * from t group by grouping set(a,b);
> ERROR: GroupingSet is not supported yet
> {code}
> As you know,
> {code:sql}
> GROUP BY a, b, c WITH CUBE
> {code}
> is equivalent to
> {code:sql}
> GROUP BY a, b, c GROUPING SETS ( (a, b, c), (a, b), (b, c), (a, c), (a), (b),
> (c), ( ))
> {code}
> And,
> {code:sql}
> GROUP BY a, b, c, WITH ROLLUP
> {code}
> is equivalent to
> {code:sql}
> GROUP BY a, b, c GROUPING SETS ( (a, b, c), (a, b), (a), ( ))
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)