You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Krisztian Kasa (Jira)" <ji...@apache.org> on 2021/10/12 11:32:00 UTC

[jira] [Updated] (HIVE-25606) The global limit invalidates the subquery order by

     [ https://issues.apache.org/jira/browse/HIVE-25606?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Krisztian Kasa updated HIVE-25606:
----------------------------------
    Component/s: Parser

> The global limit invalidates the subquery order by
> --------------------------------------------------
>
>                 Key: HIVE-25606
>                 URL: https://issues.apache.org/jira/browse/HIVE-25606
>             Project: Hive
>          Issue Type: Bug
>          Components: CBO, Parser
>    Affects Versions: 3.1.1
>            Reporter: jinwensc
>            Priority: Major
>
> create table test_1009(id int);
> insert into table test_1009 values(1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13);
> select * from (select * from test_1009 order by id desc) a limit 10;
>  
> +-------+
> | a.id |
> +-------+
> | 1 |
> | 2 |
> | 3 |
> | 4 |
> | 5 |
> | 6 |
> | 7 |
> | 8 |
> | 9 |
> | 10 |
> +–+
>  
> -----------------------
> the right result should be 
> +-------+
> | a.id |
> +-------+
> | 13 |
> | 12 |
> | 11 |
> | 10 |
> | 9 |
> | 8 |
> | 7 |
> | 6 |
> | 5 |
> | 4 |
> +-------+
>  



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