You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by "Lukas Eder (Jira)" <ji...@apache.org> on 2021/01/20 17:25:00 UTC

[jira] [Created] (IGNITE-14024) Aggregate FILTER clause is implemented incorrectly

Lukas Eder created IGNITE-14024:
-----------------------------------

             Summary: Aggregate FILTER clause is implemented incorrectly
                 Key: IGNITE-14024
                 URL: https://issues.apache.org/jira/browse/IGNITE-14024
             Project: Ignite
          Issue Type: Bug
          Components: sql
    Affects Versions: 2.9.1
            Reporter: Lukas Eder


Try this query:
{code:java}
CREATE TABLE t (i int PRIMARY KEY, j int);
INSERT INTO t VALUES (1, 1), (2, 2), (3, 3), (4, 4);
SELECT count(j) FILTER (WHERE i > 2) FROM t;{code}
The result is 4, when it should be 2

This works:
{code:java}
SELECT count(j) FILTER (WHERE i > 2)
FROM (VALUES (1, 1), (2, 2), (3, 3), (4, 4)) t(i, j);{code}
 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)