hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Laljo John Pullokkaran (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HIVE-8089) Ordering is lost when limit is put in outer query
Date Sat, 13 Sep 2014 01:23:33 GMT
Laljo John Pullokkaran created HIVE-8089:
--------------------------------------------

             Summary: Ordering is lost when limit is put in outer query
                 Key: HIVE-8089
                 URL: https://issues.apache.org/jira/browse/HIVE-8089
             Project: Hive
          Issue Type: Bug
            Reporter: Laljo John Pullokkaran


It seems like hive supports order by, limit in sub queries (compiler doesn't complain). However
ordering seems to be lost based on where you place the limit.   I haven't debugged the issue.

ex:
select key, c_int from (select key, c_int from (select key, c_int from t1 order by c_int limit
5)t1)t1;
null	NULL
null	NULL
1	1
1	1
1	1

select key, c_int from (select key, c_int from (select key, c_int from t1 order by c_int)t1
limit 5)t1;
1	1
1	1
1	1
null	NULL
null	NULL

select key, c_int from (select key, c_int from (select key, c_int from t1 order by c_int limit
5)t1 limit 5)t1;
1	1
1	1
1	1
null	NULL
null	NULL



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message