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

Hequn Cheng commented on FLINK-10676:
-------------------------------------

[~sunjincheng121] Thanks for proposing the improvement. It is more succinct. 
Oracle and SqlServer do the same:

*SqlServer*
 If ROWS/RANGE is not specified but ORDER BY is specified, RANGE UNBOUNDED 
PRECEDING AND CURRENT ROW is used as default for window frame[1]. 

*Oracle*
If you omit the windowing_clause entirely, then the default is RANGE BETWEEN 
UNBOUNDED PRECEDING AND CURRENT ROW[2].

[1] 
[https://docs.microsoft.com/en-us/sql/t-sql/queries/select-over-clause-transact-sql?view=sql-server-2017#general-remarks|https://docs.microsoft.com/en-us/sql/t-sql/queries/select-over-clause-transact-sql?view=sql-server-2017#general-remarks]
[2] 
[https://docs.oracle.com/cd/E11882_01/server.112/e41084/functions004.htm#SQLRF06174|https://docs.oracle.com/cd/E11882_01/server.112/e41084/functions004.htm#SQLRF06174]

> Add 'as' method for OverWindowWithOrderBy in Java API
> -----------------------------------------------------
>
>                 Key: FLINK-10676
>                 URL: https://issues.apache.org/jira/browse/FLINK-10676
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table API & SQL
>    Affects Versions: 1.7.0
>            Reporter: sunjincheng
>            Assignee: Chesnay Schepler
>            Priority: Major
>             Fix For: 1.7.0
>
>
> The preceding clause of OVER Window in the traditional database is optional. 
> The default is UNBOUNDED. So we can add the "as" method to 
> OverWindowWithOrderBy. This way OVERWindow is written more easily. e.g.:
> {code:java}
> .window(Over partitionBy 'c orderBy 'proctime preceding UNBOUNDED_ROW as 
> 'w){code}
> Can be simplified as follows:
> {code:java}
> .window(Over partitionBy 'c orderBy 'proctime as 'w){code}
> What do you think?
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to