You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Yu Xu (Jira)" <ji...@apache.org> on 2026/06/18 01:54:00 UTC

[jira] [Resolved] (CALCITE-7595) Support FILTER clause with window functions

     [ https://issues.apache.org/jira/browse/CALCITE-7595?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yu Xu resolved CALCITE-7595.
----------------------------
    Resolution: Fixed

Fixed in [6e08166|https://github.com/apache/calcite/commit/6e08166896934be46afcb841aaf62a771c3814db]

Thank you for the review [~mbudiu] 

> Support FILTER clause with window functions
> -------------------------------------------
>
>                 Key: CALCITE-7595
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7595
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.42.0
>            Reporter: Yu Xu
>            Assignee: Yu Xu
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.43.0
>
>
> Currently Calcite not support FILTER OVER syntax,but PostgreSQL support it:[https://www.postgresql.org/docs/current/sql-expressions.html]
> SQL
> {code:java}
> SELECT COUNT(*) FILTER (WHERE x > 5) OVER (PARTITION BY deptno) FROM t; {code}
> error
> {code:java}
> -- ERROR: SqlValidatorException: OVER must be applied to aggregate function {code}
> Maybe we can improve the filter over support.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)