opteryx icon indicating copy to clipboard operation
opteryx copied to clipboard

✨ Add complex aggregators

Open joocer opened this issue 3 years ago • 1 comments
trafficstars

The LIST aggregation type allows the values in each group to be collected and complex aggregations (i.e. ones that require more than one function call, or the output to be transformed) to be written.

Such as 'MODE' (i.e. most common value), 'RANGE' (i.e. MAX - MIN) and 'IQR'

joocer avatar Aug 26 '22 16:08 joocer

These should be implemented as plan rewrites rather than in Python. For example,

SELECT mode(age) FROM people GROUP BY location;

-->

SELECT mode(list(age)) AS mode(age) FROM people GROUP BY location;

joocer avatar Sep 04 '22 13:09 joocer