on 01-15-2018 1:15 PM
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?
That looks like an undocumented limitation (bug!) to me. I've opened a support message for this to get an official statement about the issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just checked: the fix works on 122.16. (no time to test the other versions, but I assume these work fine, too).
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.