You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2018/05/11 07:36:00 UTC
[jira] [Comment Edited] (CALCITE-2308) Query with COUNT(DISTINCT)
... GROUP BY CUBE gives wrong result
[ https://issues.apache.org/jira/browse/CALCITE-2308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16471597#comment-16471597 ]
Julian Hyde edited comment on CALCITE-2308 at 5/11/18 7:35 AM:
---------------------------------------------------------------
Might be related to CALCITE-461 and CALCITE-574.
was (Author: julianhyde):
Might be related to CALCITE-461.
> Query with COUNT(DISTINCT) ... GROUP BY CUBE gives wrong result
> ---------------------------------------------------------------
>
> Key: CALCITE-2308
> URL: https://issues.apache.org/jira/browse/CALCITE-2308
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.15.0
> Reporter: godfrey he
> Assignee: Julian Hyde
> Priority: Major
>
> Query with COUNT(DISTINCT) ... GROUP BY CUBE gives wrong result. The following query (and wrong result) is in {{agg.iq}}:
> {code:java}
> select count(distinct deptno) as cd, count(*) as c
> from "scott".emp
> group by cube(deptno);
> +----+---+
> | CD | C |
> +----+---+
> | 1 | 3 |
> | 1 | 5 |
> | 1 | 6 |
> | 3 | 3 |
> +----+---+
> (4 rows){code}
> the correct reusst is:
> {code:java}
> +----+---+
> | CD | C |
> +----+---+
> | 1 | 3 |
> | 1 | 5 |
> | 1 | 6 |
> | 3 | 14 |
> +----+---+
> {code}
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)