You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tajo.apache.org by Daniel Einspanjer <de...@gmail.com> on 2014/01/16 23:58:29 UTC

GROUP BY CUBE implementation

I noticed that the code supports a syntax of CUBE although it isn't listed
in the syntax documentation, and there aren't any unit tests covering it.

It seems that the syntax is a bit different from what I'm used to (i.e. it
isn't "GROUP BY foo,bar WITH CUBE", but rather something like "GROUP BY
CUBE (foo,bar)".

When I try a SQL statement with that clause, I get an array out of bounds
when the rewriter tries to process the UNION that the CUBE created.

Is this just not completely implemented code, or am I maybe just not
invoking it correctly?

Any docs or spec or tests on how to invoke it if I'm wrong would be welcome.

Re: GROUP BY CUBE implementation

Posted by Jihoon Son <gh...@gmail.com>.
Hi, Daniel.
Sorry for confusing you.

Currently, the cube operation is not fully implemented. Only the parser
supports it.
Related issues are ongoing (https://issues.apache.org/jira/browse/TAJO-259,
https://issues.apache.org/jira/browse/TAJO-266,
https://issues.apache.org/jira/browse/TAJO-481).

Our cube syntax follows the sql standard. You can see its bnf in
http://savage.net.au/SQL/sql-2003-2.bnf.html.

Thanks,
Jihoon

2014/1/17 Daniel Einspanjer <de...@gmail.com>

> I noticed that the code supports a syntax of CUBE although it isn't listed
> in the syntax documentation, and there aren't any unit tests covering it.
>
> It seems that the syntax is a bit different from what I'm used to (i.e. it
> isn't "GROUP BY foo,bar WITH CUBE", but rather something like "GROUP BY
> CUBE (foo,bar)".
>
> When I try a SQL statement with that clause, I get an array out of bounds
> when the rewriter tries to process the UNION that the CUBE created.
>
> Is this just not completely implemented code, or am I maybe just not
> invoking it correctly?
>
> Any docs or spec or tests on how to invoke it if I'm wrong would be
> welcome.
>



-- 
Jihoon Son

Database & Information Systems Group,
Prof. Yon Dohn Chung Lab.
Dept. of Computer Science & Engineering,
Korea University
1, 5-ga, Anam-dong, Seongbuk-gu,
Seoul, 136-713, Republic of Korea

Tel : +82-2-3290-3580
E-mail : jihoonson@korea.ac.kr

Re: GROUP BY CUBE implementation

Posted by Hyunsik Choi <hy...@apache.org>.
If those semantics are widely used, we could allow Tajo to support
that semantic.

The current CUBE is incomplete. We need to rewrite the code for cube
and rollup. We are expecting that Tajo will support CUBE and ROLLUP in
next major release after 0.8.

- hyunsik

On Fri, Jan 17, 2014 at 7:58 AM, Daniel Einspanjer
<de...@gmail.com> wrote:
> I noticed that the code supports a syntax of CUBE although it isn't listed
> in the syntax documentation, and there aren't any unit tests covering it.
>
> It seems that the syntax is a bit different from what I'm used to (i.e. it
> isn't "GROUP BY foo,bar WITH CUBE", but rather something like "GROUP BY
> CUBE (foo,bar)".
>
> When I try a SQL statement with that clause, I get an array out of bounds
> when the rewriter tries to process the UNION that the CUBE created.
>
> Is this just not completely implemented code, or am I maybe just not
> invoking it correctly?
>
> Any docs or spec or tests on how to invoke it if I'm wrong would be welcome.