You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kylin.apache.org by Pieter Schutte <pi...@structureit.net> on 2016/09/01 09:54:19 UTC

Fwd: Group by Rollup and Cube

Hi,

I am trying to use the ROLLUP and CUBE operators to summarise data using
the sample cube. If I execute the query the following error message is
returned:

*Internal error: Error while applying rule OLAPAggregateRule, args
[rel#1246:LogicalAggregate.NONE.[](input=rel#1245:Subset#1.NONE.[],group={0,
1},groups=[{0, 1}, {0}, {}],indicator=true,SUMOFPRICE=SUM($2))].*

I am using the documentation from http://calcite.apache.org/
docs/reference.html to build the query.

Test queries:

** Simple query with not using a cube*
select a, b, sum(c)
from (values (1, 2, 3, 4)) as t(a, b, c, d)
group by rollup(a, b)

This query returns the expected results

** Query using KYLIN_SALES table using ROLLUP operator*
select seller_id, leaf_categ_id, sum(price) as SumOfPrice
from kylin_sales
group by rollup(seller_id, leaf_categ_id)

This query returns the metioned error

The Kylin logs show the following when the error occurs:

[image: Inline images 1]

Not sure what is going wrong or how to to resolve the issue.

Thanks
Pieter

Re: Group by Rollup and Cube

Posted by Pieter Schutte <pi...@structureit.net>.
Great thanks.

On 5 September 2016 at 11:48, Li Yang <li...@apache.org> wrote:

> KYLIN-1732 <https://issues.apache.org/jira/browse/KYLIN-1732> is what you
> want and it is to be release in v1.5.4 soon. Please try again on the coming
> v1.5.4.
>
> Thanks
> Yang
>
> On Fri, Sep 2, 2016 at 12:59 PM, Pieter Schutte <
> pieter.schutte@structureit.net> wrote:
>
> > Apologies for the cross post.
> >
> > I'll update StackOverflow question when I get clarification here on the
> > dev mailing list.
> >
> >
> > On 2016-09-01 17:25:39 PM, Julian Hyde <jh...@apache.org> wrote:
> > I see you’ve posted the same question on Stack Overflow. Please don’t
> > cross-post… it wastes people’s time, and/or leaves a trail of unanswered
> > questions all over the place.
> >
> > > On Sep 1, 2016, at 2:54 AM, Pieter Schutte > wrote:
> > >
> > >
> > > Hi,
> > >
> > > I am trying to use the ROLLUP and CUBE operators to summarise data
> using
> > the sample cube. If I execute the query the following error message is
> > returned:
> > >
> > > Internal error: Error while applying rule OLAPAggregateRule, args
> > [rel#1246:LogicalAggregate.NONE.[](input=rel#1245:Subset#
> 1.NONE.[],group={0,
> > 1},groups=[{0, 1}, {0}, {}],indicator=true,SUMOFPRICE=SUM($2))].
> > >
> > > I am using the documentation from http://calcite.apache.org/
> > docs/reference.html to build the query.
> > >
> > > Test queries:
> > >
> > > * Simple query with not using a cube
> > > select a, b, sum(c)
> > > from (values (1, 2, 3, 4)) as t(a, b, c, d)
> > > group by rollup(a, b)
> > >
> > > This query returns the expected results
> > >
> > > * Query using KYLIN_SALES table using ROLLUP operator
> > > select seller_id, leaf_categ_id, sum(price) as SumOfPrice
> > > from kylin_sales
> > > group by rollup(seller_id, leaf_categ_id)
> > >
> > > This query returns the metioned error
> > >
> > > The Kylin logs show the following when the error occurs:
> > >
> > >
> > >
> > > Not sure what is going wrong or how to to resolve the issue.
> > >
> > > Thanks
> > > Pieter
> > >
> >
> >
>

Re: Group by Rollup and Cube

Posted by Li Yang <li...@apache.org>.
KYLIN-1732 <https://issues.apache.org/jira/browse/KYLIN-1732> is what you
want and it is to be release in v1.5.4 soon. Please try again on the coming
v1.5.4.

Thanks
Yang

On Fri, Sep 2, 2016 at 12:59 PM, Pieter Schutte <
pieter.schutte@structureit.net> wrote:

> Apologies for the cross post.
>
> I'll update StackOverflow question when I get clarification here on the
> dev mailing list.
>
>
> On 2016-09-01 17:25:39 PM, Julian Hyde <jh...@apache.org> wrote:
> I see you’ve posted the same question on Stack Overflow. Please don’t
> cross-post… it wastes people’s time, and/or leaves a trail of unanswered
> questions all over the place.
>
> > On Sep 1, 2016, at 2:54 AM, Pieter Schutte > wrote:
> >
> >
> > Hi,
> >
> > I am trying to use the ROLLUP and CUBE operators to summarise data using
> the sample cube. If I execute the query the following error message is
> returned:
> >
> > Internal error: Error while applying rule OLAPAggregateRule, args
> [rel#1246:LogicalAggregate.NONE.[](input=rel#1245:Subset#1.NONE.[],group={0,
> 1},groups=[{0, 1}, {0}, {}],indicator=true,SUMOFPRICE=SUM($2))].
> >
> > I am using the documentation from http://calcite.apache.org/
> docs/reference.html to build the query.
> >
> > Test queries:
> >
> > * Simple query with not using a cube
> > select a, b, sum(c)
> > from (values (1, 2, 3, 4)) as t(a, b, c, d)
> > group by rollup(a, b)
> >
> > This query returns the expected results
> >
> > * Query using KYLIN_SALES table using ROLLUP operator
> > select seller_id, leaf_categ_id, sum(price) as SumOfPrice
> > from kylin_sales
> > group by rollup(seller_id, leaf_categ_id)
> >
> > This query returns the metioned error
> >
> > The Kylin logs show the following when the error occurs:
> >
> >
> >
> > Not sure what is going wrong or how to to resolve the issue.
> >
> > Thanks
> > Pieter
> >
>
>

Re: Group by Rollup and Cube

Posted by Pieter Schutte <pi...@structureit.net>.
Apologies for the cross post.

I'll update StackOverflow question when I get clarification here on the dev mailing list.


On 2016-09-01 17:25:39 PM, Julian Hyde <jh...@apache.org> wrote:
I see you’ve posted the same question on Stack Overflow. Please don’t cross-post… it wastes people’s time, and/or leaves a trail of unanswered questions all over the place.

> On Sep 1, 2016, at 2:54 AM, Pieter Schutte > wrote:
>
>
> Hi,
>
> I am trying to use the ROLLUP and CUBE operators to summarise data using the sample cube. If I execute the query the following error message is returned:
>
> Internal error: Error while applying rule OLAPAggregateRule, args [rel#1246:LogicalAggregate.NONE.[](input=rel#1245:Subset#1.NONE.[],group={0, 1},groups=[{0, 1}, {0}, {}],indicator=true,SUMOFPRICE=SUM($2))].
>
> I am using the documentation from http://calcite.apache.org/docs/reference.html to build the query.
>
> Test queries:
>
> * Simple query with not using a cube
> select a, b, sum(c)
> from (values (1, 2, 3, 4)) as t(a, b, c, d)
> group by rollup(a, b)
>
> This query returns the expected results
>
> * Query using KYLIN_SALES table using ROLLUP operator
> select seller_id, leaf_categ_id, sum(price) as SumOfPrice
> from kylin_sales
> group by rollup(seller_id, leaf_categ_id)
>
> This query returns the metioned error
>
> The Kylin logs show the following when the error occurs:
>
>
>
> Not sure what is going wrong or how to to resolve the issue.
>
> Thanks
> Pieter
>


Re: Group by Rollup and Cube

Posted by Julian Hyde <jh...@apache.org>.
I see you’ve posted the same question on Stack Overflow. Please don’t cross-post… it wastes people’s time, and/or leaves a trail of unanswered questions all over the place.

> On Sep 1, 2016, at 2:54 AM, Pieter Schutte <pieter.schutte@structureit.net <ma...@structureit.net>> wrote:
> 
> 
> Hi,
> 
> I am trying to use the ROLLUP and CUBE operators to summarise data using the sample cube. If I execute the query the following error message is returned:
> 
> Internal error: Error while applying rule OLAPAggregateRule, args [rel#1246:LogicalAggregate.NONE.[](input=rel#1245:Subset#1.NONE.[],group={0, 1},groups=[{0, 1}, {0}, {}],indicator=true,SUMOFPRICE=SUM($2))].
> 
> I am using the documentation from http://calcite.apache.org/docs/reference.html <http://calcite.apache.org/docs/reference.html> to build the query.
> 
> Test queries:
> 
> * Simple query with not using a cube
> select a, b, sum(c)
> from (values (1, 2, 3, 4)) as t(a, b, c, d)
> group by rollup(a, b)
> 
> This query returns the expected results
> 
> * Query using KYLIN_SALES table using ROLLUP operator
> select seller_id, leaf_categ_id, sum(price) as SumOfPrice
> from kylin_sales
> group by rollup(seller_id, leaf_categ_id)
> 
> This query returns the metioned error
> 
> The Kylin logs show the following when the error occurs:
> 
> 
> 
> Not sure what is going wrong or how to to resolve the issue.
> 
> Thanks
> Pieter
>