Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.3.0-incubating
-
None
-
None
Description
Window aggregate on top of a regular aggregate expression is a valid query but currently fails with a 'aggregate expression cannot be nested' error.
SELECT avg(sum(sal)) over (partition by deptno) from emp group by deptno; SEVERE: org.apache.calcite.sql.validate.SqlValidatorException: Aggregate expressions cannot be nested
We should allow one level nesting of aggregates under window aggregates, i.e. window_agg(regular_agg(args)) over window.
Attachments
Issue Links
- relates to
-
CALCITE-1327 Nested aggregate windowed query fails
- Closed