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

ASF GitHub Bot commented on TAJO-774:
-------------------------------------

GitHub user hyunsik opened a pull request:

    https://github.com/apache/tajo/pull/13

    TAJO-774: Implement logical plan part and physical executor for window 
function.

    This patch adds the logical planning part, distributed planning part, and 
sort-based window aggregation physical executors. They enables Tajo to use 
existing aggregation functions in OVER clause and add row_number() and rank().
    
    This implementation has some limits. First of all, this patch does not 
support multiple different partition key groups in a query.
    
    Example:
    ```
    SELECT rank OVER(PARTITION BY P ORDER BY K), avg OVER( PARTITION BY P) ...
    ```
    
    In above case, a query contains two OVER clauses which have the same 
PARTITION KEY group. So, it becomes available in this patch. But, the following 
case is not available.
    
    ```
    SELECT rank OVER(PARTITION BY P ORDER BY K), avg OVER( PARTITION BY W) ...
    ```
    
    In addition, there is one limit. This patch does not support the definition 
clause for window specification. I'll add this feature later.
    
    The followings are examples provided by this patch.
    ```
    SELECT sum(l_quantity) OVER () FROM LINEITEM
    
    SELECT l_orderkey, l_quantity, sum(l_quantity) OVER (PARTITION BY 
l_orderkey) FROM LINEITEM
    
    SELECT l_orderkey, l_discount, sum(l_discount) OVER (PARTITION BY 
l_orderkey), sum(l_quantity)             OVER (PARTITION BY l_orderkey) FROM 
LINEITEM
    
    SELECT l_orderkey, l_partkey, rank() OVER (ORDER BY l_orderkey) r1, rank() 
OVER(ORDER BY l_partkey desc) r2 FROM LINEITEM
    ```

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/hyunsik/tajo TAJO-774_2

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/tajo/pull/13.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #13
    
----
commit 95d1026043d711156e6d3ea62eacf8a9552fff7c
Author: Hyunsik Choi <[email protected]>
Date:   2014-05-20T18:34:18Z

    TAJO-774: Implement logical plan part and physical executor for window 
function.

----


> Implement logical plan part and physical executor for window function.
> ----------------------------------------------------------------------
>
>                 Key: TAJO-774
>                 URL: https://issues.apache.org/jira/browse/TAJO-774
>             Project: Tajo
>          Issue Type: Sub-task
>          Components: planner/optimizer
>            Reporter: Hyunsik Choi
>            Assignee: Hyunsik Choi
>             Fix For: 0.9.0
>
>
> See the title. The main objective of this issue is to implement the logical 
> planning part for window function support.



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

Reply via email to