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

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

| (/) *{color:green}+1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
|| || || || {color:brown} Prechecks {color} ||
| {color:green}+1{color} | {color:green} @author {color} | {color:green}  0m  
0s{color} | {color:green} The patch does not contain any @author tags. {color} |
|| || || || {color:brown} master Compile Tests {color} ||
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:green}+1{color} | {color:green} whitespace {color} | {color:green}  0m 
 1s{color} | {color:green} The patch has no whitespace issues. {color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  1m 
 4s{color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black}  1m 58s{color} | 
{color:black} {color} |
\\
\\
|| Subsystem || Report/Notes ||
| Optional Tests |  asflicense  |
| uname | Linux hiveptest-server-upstream 3.16.0-4-amd64 #1 SMP Debian 
3.16.43-2+deb8u5 (2017-09-19) x86_64 GNU/Linux |
| Build tool | maven |
| Personality | 
/data/hiveptest/working/yetus_PreCommit-HIVE-Build-17345/dev-support/hive-personality.sh
 |
| git revision | master / f0c29ac |
| modules | C: ql U: ql |
| Console output | 
http://104.198.109.242/logs//PreCommit-HIVE-Build-17345/yetus.txt |
| Powered by | Apache Yetus    http://yetus.apache.org |


This message was automatically generated.



> 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