You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2020/09/15 18:18:00 UTC

[jira] [Commented] (ASTERIXDB-2778) Incorrect result order with GROUP BY ROLLUP

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

ASF subversion and git services commented on ASTERIXDB-2778:
------------------------------------------------------------

Commit 6a55b01a2dabf798244362ffe8788fbadeff7e5e in asterixdb's branch refs/heads/master from Dmitry Lychagin
[ https://gitbox.apache.org/repos/asf?p=asterixdb.git;h=6a55b01 ]

[ASTERIXDB-2778][COMP] Incorrect result order with grouping sets

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Fix incorrect order produced by ORDER BY
  in the presence of GROUP BY with GROUPING SETS
- SqlppExpressionToPlanTranslator should include
  GroupBy's decor variables when processing SELECT *
- UnionAll runtime should not emit next frame
  if it's in the failed state

Change-Id: If9ccdb70b0905ae34a46e1cc112a424eb00406b8
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/7884
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Dmitry Lychagin <dm...@couchbase.com>
Reviewed-by: Ali Alsuliman <al...@gmail.com>


> Incorrect result order with GROUP BY ROLLUP
> -------------------------------------------
>
>                 Key: ASTERIXDB-2778
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-2778
>             Project: Apache AsterixDB
>          Issue Type: Bug
>          Components: COMP - Compiler
>    Affects Versions: 0.9.5
>            Reporter: Dmitry Lychagin
>            Assignee: Dmitry Lychagin
>            Priority: Major
>             Fix For: 0.9.6
>
>
> Incorrect result order for the following query:
>  
> {noformat}
> SELECT
>   ROUND(SUM(i.qty * i.selling_price)) total,
>   p.category, p.name
> FROM ShopALot.Orders o
> UNNEST o.items i
> JOIN ShopALot.Products p ON i.product_id = p.product_id
> GROUP BY ROLLUP(p.category, p.name)
> ORDER BY total desc, p.category, p.name
> LIMIT 20;
>  {noformat}
> The result is not ordered by 'total' field.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)