You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Yury Gerzhedovich (Jira)" <ji...@apache.org> on 2021/01/28 09:22:00 UTC
[jira] [Commented] (IGNITE-14024) Aggregate FILTER clause is
implemented incorrectly
[ https://issues.apache.org/jira/browse/IGNITE-14024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17273444#comment-17273444 ]
Yury Gerzhedovich commented on IGNITE-14024:
--------------------------------------------
[~lukas.eder], I confirm the bug. It's news for me that there is such syntaxis at all.
Seems fix shouldn't be tricky
> 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
> Priority: Major
>
> 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)