[ 
https://issues.apache.org/jira/browse/CALCITE-4748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17402894#comment-17402894
 ] 

duan xiong commented on CALCITE-4748:
-------------------------------------

[~julianhyde] I didn't implement this to rewrite RelNode to the union.

I make the  Aggregate RelNode support order set(Now is strictlyOrder), then 
implement the EnumerableAggregate to support duplicate GROUPING SETS by concat 
the result tother. 

And I didn't add a new test in this PR. Because the test has some wrong with 
calcite so I change that.

And add some SQL results in the file about agg.iq to approve before the test 
has a bug, after the PR they can get the right or same answer.

I will submit PR soon.

> 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)

Reply via email to