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

Ashutosh Chauhan commented on HIVE-13475:
-----------------------------------------

Can you add following test case:
{code}
 select rank () over(partition by key order by sum(c_int - c_float) desc) ,
dense_rank () over(partition by lower(value) order by sum(c_float/c_int) asc),
percent_rank () over(partition by max(c_int) order by sum((c_float/c_int) - 
c_int) asc) from cbo_t3;

{code}

> Allow aggregate functions in over clause
> ----------------------------------------
>
>                 Key: HIVE-13475
>                 URL: https://issues.apache.org/jira/browse/HIVE-13475
>             Project: Hive
>          Issue Type: New Feature
>          Components: Parser
>    Affects Versions: 2.1.0
>            Reporter: Jesus Camacho Rodriguez
>            Assignee: Jesus Camacho Rodriguez
>         Attachments: HIVE-13475.patch
>
>
> Support to reference aggregate functions within the over clause needs to be 
> added. For instance, currently the following query will fail:
> {noformat}
> select rank() over (order by sum(ws.c_int)) as return_rank
> from cbo_t3 ws
> group by ws.key;
> {noformat}



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

Reply via email to