[
https://issues.apache.org/jira/browse/CALCITE-4748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17403328#comment-17403328
]
Julian Hyde commented on CALCITE-4748:
--------------------------------------
Do you understand that GROUP_ID is only useful if there are duplicate grouping
sets? And people will often use GROUP_ID if they have duplicate grouping sets.
And that we only fixed 1824 the way we did because we didn't then allow
duplicates.
The features are linked. If the implementations are not linked, that is tech
debt that will cause bugs in future.
> If there are duplicate GROUPING SETS, Calcite should return duplicate rows
> --------------------------------------------------------------------------
>
> 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)