You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "jinwensc (Jira)" <ji...@apache.org> on 2021/10/09 10:19:00 UTC
[jira] [Created] (HIVE-25606) The global limit invalidates the
subquery order by
jinwensc created HIVE-25606:
-------------------------------
Summary: 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
Affects Versions: 3.1.1
Reporter: jinwensc
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)