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 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)
The error mentioned at the start of question is returned when executing this query.