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

Ashutosh Chauhan commented on HIVE-7063:
----------------------------------------

This is not going to optimize limit with rank like following :
{code}
select * from ( select p_mfgr, rank() over(..) from part) a limit 4;
{code}
Rather, this optimization is targeted for rank with filter predicates. It does 
seem like users are likely to write query with filter predicate given semantics 
of rank so this may not be an issue, but I think its good to note here so 
expectations are clear.

> Optimize for the Top N within a Group use case
> ----------------------------------------------
>
>                 Key: HIVE-7063
>                 URL: https://issues.apache.org/jira/browse/HIVE-7063
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Harish Butani
>            Assignee: Harish Butani
>         Attachments: HIVE-7063.1.patch, HIVE-7063.2.patch
>
>
> It is common to rank within a Group/Partition and then only return the Top N 
> entries within each Group.
> With Streaming mode for Windowing, we should push the post filter on the rank 
> into the Windowing processing as a Limit expression.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to