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 2021/08/22 00:01:20 UTC
[jira] [Comment Edited] (CALCITE-4748) duplicate columnName in
grouping sets get the wrong result
[ https://issues.apache.org/jira/browse/CALCITE-4748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17402699#comment-17402699 ]
Julian Hyde edited comment on CALCITE-4748 at 8/22/21, 12:00 AM:
-----------------------------------------------------------------
Yes. I ran
{code:java}
select deptno
from emp
group by grouping sets (deptno, deptno){code}
on Oracle and it returned
{noformat}
DEPTNO
======
10
20
30
10
20
30{noformat}
Please change the subject to "If there are duplicate GROUPING SETS, Calcite should return duplicate rows".
was (Author: julianhyde):
Yes. I ran
{code:java}
select deptno
from emp
group by grouping sets (deptno, deptno){code}
on Oracle and it returned
{noformat}
DEPTNO
======
10
20
30
10
20
30{noformat}
Please change the subject to "If there are duplicate grouping sets, Calcite should return duplicate rows".
> duplicate columnName in grouping sets get the wrong result
> ----------------------------------------------------------
>
> Key: CALCITE-4748
> URL: https://issues.apache.org/jira/browse/CALCITE-4748
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.27.0
> Reporter: duan xiong
> Assignee: duan xiong
> Priority: Critical
>
> When run SQL1:
> {code:java}
> select prod_id from foodmart.sales_fact_1997 as s group by grouping sets(prod_id,prod_id){code}
> and SQL2:
> {code:java}
> select prod_id from foodmart.sales_fact_1997 as s group by grouping sets(prod_id){code}
> get the SAME result. This is wrong. SQL1 return result's number = SQL2 return result*2 number
--
This message was sent by Atlassian Jira
(v8.3.4#803005)