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.schu...@structureit.net > <mailto:pieter.schu...@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 >