I constructed the following query:

SELECT L_ORDERKEY as orderkey,
L_LINENUMBER as number,
L_TAX as tax,
AVG(L_EXTENDEDPRICE * L_PARTKEY) as avg_price
FROM lineitem <br> GROUP BY GROUPING SETS(L_ORDERKEY, L_LINENUMBER, L_TAX);

Since I constructed it such that it consumes quite a bit of time, the result is obviously not really expressive.

Anyway, if table lineitem is on row store, the query is processed without any errors. If it is on columnar store, I get the error:

feature not supported: aggregation has unsupported expressions

After either removing the arithmetic expression in AVG or removing the "GROUPING SETS" and the parentheses, it executes fine again. So does it if I use SUM instead of AVG.

So what's the matter with GROUPING SETS in connection with arithemtic expressions in AVG and why is this only a problem for column tables?

## Add comment