Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Duplicate
-
1.12.0
-
None
-
None
Description
Windowing functions should allow aggregate functions in the over() clause, but do not.
This query:
select pay_period, sum(money) as sum_money
, rank() over(order by sum(money)) as rnk
from (values (1,200), (1,40), (2,30), (2, 239), (3,1)) base(pay_period, money)
group by pay_period
should work, but does not, and returns this error:
SYSTEM ERROR: AssertionError: Internal error: invariant violated: conversion result not null
[Error Id: 8df6f6f1-41af-42b3-95d5-b2117b49bec5 on <host>:31010]
This should be allowed in standards, and doable.