You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Peter Vary (Jira)" <ji...@apache.org> on 2020/04/01 09:14:00 UTC
[jira] [Commented] (HIVE-23101) Fix topnkey_grouping_sets
[ https://issues.apache.org/jira/browse/HIVE-23101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17072549#comment-17072549 ]
Peter Vary commented on HIVE-23101:
-----------------------------------
Pushed the patch 1 to master to unblock PreCommits.
> Fix topnkey_grouping_sets
> -------------------------
>
> Key: HIVE-23101
> URL: https://issues.apache.org/jira/browse/HIVE-23101
> Project: Hive
> Issue Type: Sub-task
> Reporter: Krisztian Kasa
> Assignee: Krisztian Kasa
> Priority: Major
> Fix For: 4.0.0
>
> Attachments: HIVE-23101.1.patch, HIVE-23101.2.patch
>
>
> Example:
> {code}
> Client Execution succeeded but contained differences (error code = 1) after executing topnkey_grouping_sets.q
> 260c260
> < NULL NULL
> ---
> > NULL 1
> {code}
>
> Test *topnkey_grouping_sets* fails intermittently.
> Queries which project 2 columns but order by only one of them can have more than one good result set:
> {code:java}
> CREATE TABLE t_test_grouping_sets(
> a int,
> b int,
> c int
> );
> INSERT INTO t_test_grouping_sets VALUES
> (NULL, NULL, NULL),
> (5, 2, 3),
> (10, 11, 12),
> (NULL, NULL, NULL),
> (NULL, NULL, NULL),
> (6, 2, 1),
> (7, 8, 4), (7, 8, 4), (7, 8, 4),
> (5, 1, 2), (5, 1, 2), (5, 1, 2),
> (NULL, NULL, NULL);
> SELECT a, b FROM t_test_grouping_sets GROUP BY GROUPING SETS ((a, b), (a), (b), ()) ORDER BY a LIMIT 10;
> {code}
> {code:java}
> 5 NULL
> 5 2
> 5 1
> 6 2
> 6 NULL
> 7 8
> 7 NULL
> 10 NULL
> 10 11
> NULL 1
> {code}
> {code:java}
> 5 NULL
> 5 2
> 5 1
> 6 2
> 6 NULL
> 7 8
> 7 NULL
> 10 NULL
> 10 11
> NULL NULL
> {code}
> Since we don't order by *b* both result sets are valid.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)