You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "godfrey he (JIRA)" <ji...@apache.org> on 2018/05/11 06:53:00 UTC
[jira] [Updated] (CALCITE-2308) error reuslt in agg.iq when
argument to COUNT(DISTINCT) is a GROUP BY column
[ https://issues.apache.org/jira/browse/CALCITE-2308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
godfrey he updated CALCITE-2308:
--------------------------------
Description:
test 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 reuslt is:
{code:java}
+----+---+
| CD | C |
+----+---+
| 1 | 3 |
| 1 | 5 |
| 1 | 6 |
| 3 | 14 |
+----+---+
{code}
was:
test 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 reuslt is:
{code:java}
+----+---+
| CD | C |
+----+---+
| 1 | 3 |
| 1 | 5 |
| 1 | 6 |
| 3 | 14 |
+----+---+
{code}
> error reuslt in agg.iq when argument to COUNT(DISTINCT) is a GROUP BY column
> ----------------------------------------------------------------------------
>
> 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
>
>
> test 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 reuslt 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)