[ 
https://issues.apache.org/jira/browse/SPARK-14361?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xin Wu updated SPARK-14361:
---------------------------
    Description: 
The current Spark SQL does not support the exclusion clause in Window function 
framing, which is part of ANSI SQL2003’s Window syntax. For example, IBM 
Netezza fully supports it as shown in the 
https://www.ibm.com/support/knowledgecenter/SSULQD_7.1.0/com.ibm.nz.dbu.doc/c_dbuser_window_aggregation_family_syntax.html).
 We propose to implement it in this JIRA.. 

The ANSI SQL2003's Window Syntax:
{code}
FUNCTION_NAME(expr) OVER {window_name | (window_specification)}
window_specification ::= [window_name] [partitioning] [ordering] [framing]
partitioning ::= PARTITION BY value[, value...] [COLLATE collation_name]
ordering ::= ORDER [SIBLINGS] BY rule[, rule...]
rule ::= {value | position | alias} [ASC | DESC] [NULLS {FIRST | LAST}]
framing ::= {ROWS | RANGE} {start | between} [exclusion]
start ::= {UNBOUNDED PRECEDING | unsigned-integer PRECEDING | CURRENT ROW}
between ::= BETWEEN bound AND bound
bound ::= {start | UNBOUNDED FOLLOWING | unsigned-integer FOLLOWING}
exclusion ::= {EXCLUDE CURRENT ROW | EXCLUDE GROUP | EXCLUDE TIES | EXCLUDE NO 
OTHERS}
{code}

  was:
The current Spark SQL does not support the `exclusion` clause, which is part of 
ANSI 

SQL2003’s `Window` syntax. For example, IBM Netezza fully supports it as shown 
in the 

[document web link]

(https://www.ibm.com/support/knowledgecenter/SSULQD_7.1.0/com.ibm.nz.dbu.doc/c_dbuser_wi

ndow_aggregation_family_syntax.html). This PR is to fill the gap. 



> Support EXCLUDE clause in Window function framing
> -------------------------------------------------
>
>                 Key: SPARK-14361
>                 URL: https://issues.apache.org/jira/browse/SPARK-14361
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 2.0.0
>            Reporter: Xin Wu
>
> The current Spark SQL does not support the exclusion clause in Window 
> function framing, which is part of ANSI SQL2003’s Window syntax. For example, 
> IBM Netezza fully supports it as shown in the 
> https://www.ibm.com/support/knowledgecenter/SSULQD_7.1.0/com.ibm.nz.dbu.doc/c_dbuser_window_aggregation_family_syntax.html).
>  We propose to implement it in this JIRA.. 
> The ANSI SQL2003's Window Syntax:
> {code}
> FUNCTION_NAME(expr) OVER {window_name | (window_specification)}
> window_specification ::= [window_name] [partitioning] [ordering] [framing]
> partitioning ::= PARTITION BY value[, value...] [COLLATE collation_name]
> ordering ::= ORDER [SIBLINGS] BY rule[, rule...]
> rule ::= {value | position | alias} [ASC | DESC] [NULLS {FIRST | LAST}]
> framing ::= {ROWS | RANGE} {start | between} [exclusion]
> start ::= {UNBOUNDED PRECEDING | unsigned-integer PRECEDING | CURRENT ROW}
> between ::= BETWEEN bound AND bound
> bound ::= {start | UNBOUNDED FOLLOWING | unsigned-integer FOLLOWING}
> exclusion ::= {EXCLUDE CURRENT ROW | EXCLUDE GROUP | EXCLUDE TIES | EXCLUDE 
> NO OTHERS}
> {code}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to