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

Hyunsik Choi commented on TAJO-757:
-----------------------------------

Created a review request against branch master in reviewboard
https://reviews.apache.org/r/20289/


> Add parser rule and algebraic expression for window function
> ------------------------------------------------------------
>
>                 Key: TAJO-757
>                 URL: https://issues.apache.org/jira/browse/TAJO-757
>             Project: Tajo
>          Issue Type: Sub-task
>          Components: distributed query plan, parser, physical operator, 
> planner/optimizer
>            Reporter: Hyunsik Choi
>            Assignee: Hyunsik Choi
>             Fix For: 1.0-incubating
>
>         Attachments: TAJO-757.patch
>
>
> See the title. The object of this issue is to add ANTLR parser rule and 
> algebraic expression for window function.
> According to SQL 2003 standards, BNF for window function is as follows:
> {noformat}
> <window function>    ::=   <window function type> OVER <window name or 
> specification>
> <window function type>    ::= 
>          <rank function type> <left paren> <right paren>
>      |     ROW_NUMBER <left paren> <right paren>
>      |     <aggregate function>
> <rank function type>    ::=   RANK | DENSE_RANK | PERCENT_RANK | CUME_DIST
> <window name or specification>    ::=   <window name> | <in-line window 
> specification>
> <in-line window specification>    ::=   <window specification>
> <window specification>    ::=   <left paren> <window specification details> 
> <right paren>
> <window specification details>    ::= 
>          [ <existing window name> ] [ <window partition clause> ] [ <window 
> order clause> ] [ <window frame clause> ]
> <existing window name>    ::=   <window name>
> <window partition clause>    ::=   PARTITION BY <window partition column 
> reference list>
> <window partition column reference list>    ::=   <window partition column 
> reference> [ { <comma> <window partition column reference> }... ]
> <window partition column reference>    ::=   <column reference> [ <collate 
> clause> ]
> <window order clause>    ::=   ORDER BY <sort specification list>
> <window frame clause>    ::=   <window frame units> <window frame extent> [ 
> <window frame exclusion> ]
> <window frame units>    ::=   ROWS | RANGE
> <window frame extent>    ::=   <window frame start> | <window frame between>
> <window frame start>    ::=   UNBOUNDED PRECEDING | <window frame preceding> 
> | CURRENT ROW
> <window frame preceding>    ::=   <unsigned value specification> PRECEDING
> <window frame between>    ::=   BETWEEN <window frame bound 1> AND <window 
> frame bound 2>
> <window frame bound 1>    ::=   <window frame bound>
> <window frame bound 2>    ::=   <window frame bound>
> <window frame bound>    ::= 
>          <window frame start>
>      |     UNBOUNDED FOLLOWING 
>      |     <window frame following>
> <window frame following>    ::=   <unsigned value specification> FOLLOWING
> <window frame exclusion>    ::= 
>          EXCLUDE CURRENT ROW 
>      |     EXCLUDE GROUP 
>      |     EXCLUDE TIES 
>      |     EXCLUDE NO OTHERS
> {noformat}



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

Reply via email to