Uploaded image for project: 'Tajo (Retired)'
  1. Tajo (Retired)
  2. TAJO-756 (Umbrella) Window function support
  3. TAJO-757

Add parser rule and algebraic expression for window function




      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:

      <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


        1. TAJO-757.patch
          57 kB
          Hyunsik Choi



            hyunsik Hyunsik Choi
            hyunsik Hyunsik Choi
            0 Vote for this issue
            1 Start watching this issue