[ 
https://issues.apache.org/jira/browse/HIVE-21802?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16851523#comment-16851523
 ] 

Hive QA commented on HIVE-21802:
--------------------------------



Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12970175/HIVE-21802.2.patch

{color:red}ERROR:{color} -1 due to build exiting with an error

Test results: 
https://builds.apache.org/job/PreCommit-HIVE-Build/17348/testReport
Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/17348/console
Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-17348/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Tests exited with: Exception: Patch URL 
https://issues.apache.org/jira/secure/attachment/12970175/HIVE-21802.2.patch 
was found in seen patch url's cache and a test was probably run already on it. 
Aborting...
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12970175 - PreCommit-HIVE-Build

> Add support of multilpe ORDER BY clause position
> ------------------------------------------------
>
>                 Key: HIVE-21802
>                 URL: https://issues.apache.org/jira/browse/HIVE-21802
>             Project: Hive
>          Issue Type: Bug
>          Components: Parser, Query Processor
>            Reporter: Oleksiy Sayankin
>            Assignee: Oleksiy Sayankin
>            Priority: Critical
>         Attachments: HIVE-21802.1.patch, HIVE-21802.2.patch
>
>
> *STEPS TO REPRODUCE:*
> 1. Create a table:
> {code:java}
> CREATE TABLE i (id INT, a1 INT, b1 BOOLEAN);
> {code}
> 2. Run the query which was working in Hive-1.2: ({{ORDER}} clause _before_ 
> {{WINDOW}})
> {code:java}
> SELECT id
> FROM ( 
>     SELECT 
>         id, 
>         a1,  
>         ROW_NUMBER() OVER w1 AS rn, 
>         b1 
>     FROM i a
>     ORDER BY id, b1, a1 DESC
>     WINDOW w1 as (PARTITION BY id, b1 ORDER BY a1 DESC)
> ) tmp WHERE rn=1 DISTRIBUTE BY id;
> {code}
> *ACTUAL RESULT:*
> The query fails with an exception you can find above.
> The query from Step 2 which works for Hive-2.3 is ( ({{ORDER}} clause _after_ 
> {{WINDOW}})):
> {code:java}
> SELECT id
> FROM ( 
>     SELECT 
>         id, 
>         a1,  
>         ROW_NUMBER() OVER w1 AS rn, 
>         b1 
>     FROM i a
>     WINDOW w1 as (PARTITION BY id, b1 ORDER BY a1 DESC)
>     ORDER BY id, b1, a1 DESC
> ) tmp WHERE rn=1 DISTRIBUTE BY id;
> {code}
>  Hive-2.3 also fails to parse subquery ( ({{ORDER}} clause _before_ 
> {{WINDOW}})):
> {code:java}
>     SELECT 
>         id, 
>         a1,  
>         ROW_NUMBER() OVER w1 AS rn, 
>         b1 
>     FROM i a
>     ORDER BY id, b1, a1 DESC
>     WINDOW w1 as (PARTITION BY id, b1 ORDER BY a1 DESC)
> {code}
> Customer is facing issue regularly this is occurring after upgrade . the 
> workaround given by us need lot of code changes which will get them back to 
> squire one they need to follow process and will cost them a lot. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to