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/08/27 19:18:00 UTC

[jira] [Commented] (CALCITE-2490) Wrong results when grouping set is repeated

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

Julian Hyde commented on CALCITE-2490:
--------------------------------------

It seems very plausible that the Postgres behavior is correct (I haven't checked the SQL standard).

However it's a degenerate case and I would not want to make "grouping sets (a)" any less efficient in order to deal with "grouping sets (a), (a)". So, if we solve this, I'd be inclined to do a nasty solution for the degenerate case rather than mess up the usual case. For example, if relational algebra code is assuming that grouping sets are unique, let it continue to make that assumption.

> Wrong results when grouping set is repeated
> -------------------------------------------
>
>                 Key: CALCITE-2490
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2490
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.17.0
>            Reporter: Vladimir Sitnikov
>            Assignee: Julian Hyde
>            Priority: Major
>
> The following query produces 2 rows in PostgreSQL and just one in Calcite
> {code:sql}select count(*)
>   from (select * from (values(1)) as t(a))
>  group by grouping sets ((a), (a)){code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)