[jira] [Commented] (HIVE-4429) Nested ORDER BY produces incorrect result
[ https://issues.apache.org/jira/browse/HIVE-4429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13643453#comment-13643453 ] Lianhui Wang commented on HIVE-4429: hi, Mihir Kulkarni i run the first sql of your cases, but in my hive-0.9, it produces correct result.it is the following. 30.01.0 20.01.0 10.01.0 30.02.0 20.02.0 10.02.0 30.03.0 20.03.0 10.03.0 60.04.0 50.04.0 40.04.0 60.05.0 50.05.0 40.05.0 60.06.0 50.06.0 40.06.0 so can you tell which version you used. Nested ORDER BY produces incorrect result - Key: HIVE-4429 URL: https://issues.apache.org/jira/browse/HIVE-4429 Project: Hive Issue Type: Bug Components: Query Processor, SQL, UDF Affects Versions: 0.9.0 Environment: Red Hat Linux VM with Hive 0.9 and Hadoop 2.0 Reporter: Mihir Kulkarni Priority: Critical Attachments: Hive_Command_Script.txt, HiveQuery.txt, Test_Data.txt Nested ORDER BY clause doesn't honor the outer one in specific case. The below query produces result which honors only the inner ORDER BY clause. (it produces only 1 MapRed job) {code:borderStyle=solid} SELECT alias.b0 as d0, alias.b1 as d1 FROM (SELECT test.a0 as b0, test.a1 as b1 FROM test ORDER BY b1 ASC, b0 DESC) alias ORDER BY d0 ASC, d1 DESC; {code} On the other hand the query below honors the outer ORDER BY clause which produces the correct result. (it produces 2 MapRed jobs) {code:borderStyle=solid} SELECT alias.b0 as d0, alias.b1 as d1 FROM (SELECT test.a0 as b0, test.a1 as b1 FROM test ORDER BY b1 ASC, b0 DESC) alias ORDER BY d0 DESC, d1 DESC; {code} Any other combination of nested ORDER BY clauses does produce the correct result. Please see attachments for query, schema and Hive Commands for reprocase. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-4429) Nested ORDER BY produces incorrect result
[ https://issues.apache.org/jira/browse/HIVE-4429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13643483#comment-13643483 ] Mihir Kulkarni commented on HIVE-4429: -- [~lianhuiwang] Isn't the output you mentioned above wrong? Because my first sql says *ORDER BY d0 ASC, d1 DESC* And the output you get is *d1 ASC d0 DESC* Nested ORDER BY produces incorrect result - Key: HIVE-4429 URL: https://issues.apache.org/jira/browse/HIVE-4429 Project: Hive Issue Type: Bug Components: Query Processor, SQL, UDF Affects Versions: 0.9.0 Environment: Red Hat Linux VM with Hive 0.9 and Hadoop 2.0 Reporter: Mihir Kulkarni Priority: Critical Attachments: Hive_Command_Script.txt, HiveQuery.txt, Test_Data.txt Nested ORDER BY clause doesn't honor the outer one in specific case. The below query produces result which honors only the inner ORDER BY clause. (it produces only 1 MapRed job) {code:borderStyle=solid} SELECT alias.b0 as d0, alias.b1 as d1 FROM (SELECT test.a0 as b0, test.a1 as b1 FROM test ORDER BY b1 ASC, b0 DESC) alias ORDER BY d0 ASC, d1 DESC; {code} On the other hand the query below honors the outer ORDER BY clause which produces the correct result. (it produces 2 MapRed jobs) {code:borderStyle=solid} SELECT alias.b0 as d0, alias.b1 as d1 FROM (SELECT test.a0 as b0, test.a1 as b1 FROM test ORDER BY b1 ASC, b0 DESC) alias ORDER BY d0 DESC, d1 DESC; {code} Any other combination of nested ORDER BY clauses does produce the correct result. Please see attachments for query, schema and Hive Commands for reprocase. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira