Open
Description
Queries with multiple partition-by clauses are not supported yet. Example:
SELECT
ROW_NUMBER() OVER (
PARTITION BY uuid,
path,
ORDER BY
inserted_at DESC
) AS rn,
RANK() OVER (
PARTITION BY uuid
ORDER BY
inserted_at DESC
) AS rk
FROM tbl
The query above fails with the following error which comes from the window exchange node insert rule.
QueryPlanningError: Error optimizing query: Currently only 1 window group is supported, query has 2 groups
One way to tackle such a scenario is to break a Window operator into consecutive operators that run one after another and compute the different window functions. (Presto also does this)
Link:
cc: @somandal