[
https://issues.apache.org/jira/browse/CALCITE-6538?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Julian Hyde resolved CALCITE-6538.
----------------------------------
Fix Version/s: 1.38.0
Resolution: Duplicate
Resolved in
[99a0df1|https://github.com/apache/calcite/commit/99a0df108a9f72805afb6d87ec5b2c0ed258f1ec]
as part of CALCITE-5883.
> OVER (ROWS CURRENT ROW) should return a window with one row, not all rows
> -------------------------------------------------------------------------
>
> Key: CALCITE-6538
> URL: https://issues.apache.org/jira/browse/CALCITE-6538
> Project: Calcite
> Issue Type: Improvement
> Reporter: Julian Hyde
> Priority: Major
> Fix For: 1.38.0
>
>
> {{OVER (ROWS CURRENT ROW)}} should return a window with one row, not all rows.
> For example, in the following query (in {{{}winagg.iq{}}}) each {{sum_sal}}
> value should equal the {{sal}} value (and does on Postgres), but currently
> Calcite gives {{{}8275.00{}}}:
> {noformat}
> # Current row
> select ename, sal, sum(sal) over (rows current row) as sum_sal
> from emp
> where job = 'MANAGER';
> +-------+---------+---------+
> | ENAME | SAL | SUM_SAL |
> +-------+---------+---------+
> | BLAKE | 2850.00 | 8275.00 |
> | CLARK | 2450.00 | 8275.00 |
> | JONES | 2975.00 | 8275.00 |
> +-------+---------+---------+
> (3 rows)
> !ok {noformat}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)