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

sunjincheng edited comment on FLINK-6228 at 4/5/17 1:54 PM:
------------------------------------------------------------

IMO.The definition of the tableAPI window can be divided into two parts:
1. Window size definition: For example: {{TumbleWindow}}, {{SlideWindow}}, 
{{SessionWindow}}, {{OverWindow}} (in this JIRA. will added)
2. Window trigger type definition: For example: {{groupBy}} a group of output a 
result and {{over}} each row output a result (in this JIRA. will added)
So, in the future we want to support the following two combinations:
{code}
   groupBy('windowAlias) --> groupBy + (TumbleWindow, SlideWindow, 
SessionWindow, OverWindow) with groupAgg
    over  'windowAlias --> over+ (TumbleWindow, SlideWindow, SessionWindow, 
OverWindow) wich overAgg
{code}
In other words, the four window size definitions (Tumble, Slide, Session, Over) 
and two window trigger type definition (groupBy, over) is orthogonal. And 
moreover TableAPI is powerful than SQL, i.e. SQL supports the functionality of 
a subset of the Table API. (Although In this JIRA. we only implement over + 
OverWindow).
what do you think?

Best,
SunJincheng


was (Author: sunjincheng121):
IMO.The definition of the tableAPI window can be divided into two parts:
1. Window size definition: For example: {{TumbleWindow}}, {{SlideWindow}}, 
{{SessionWindow}}, {{OverWindow}} (in this JIRA. will added)
2. Window trigger type definition: For example: {{groupBy}} a group of output a 
result and {{over}} each row output a result (in this JIRA. will added)
So, in the future we want to support the following two combinations:
{code}
    groupBy + (TumbleWindow, SlideWindow, SessionWindow, OverWindow) with 
groupAgg
    over + (TumbleWindow, SlideWindow, SessionWindow, OverWindow) wich overAgg
{code}
In other words, the four window size definitions (Tumble, Slide, Session, Over) 
and two window trigger type definition (groupBy, over) is orthogonal. And 
moreover TableAPI is powerful than SQL, i.e. SQL supports the functionality of 
a subset of the Table API. (Although In this JIRA. we only implement over + 
OverWindow).
what do you think?

Best,
SunJincheng

> Integrating the OVER windows in the Table API
> ---------------------------------------------
>
>                 Key: FLINK-6228
>                 URL: https://issues.apache.org/jira/browse/FLINK-6228
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table API & SQL
>            Reporter: sunjincheng
>            Assignee: sunjincheng
>
> Syntax:
> {code}
> table
>    .overWindows(
>     (Rows|Range [ partitionBy value_expression , ... [ n ]] [ orderBy 
> order_by_expression] 
>       (preceding  
> UNBOUNDED|value_specification.(rows|milli|second|minute|hour|day|month|year)|CURRENTROW)
>      [following 
> UNBOUNDED|value_specification.(rows|milli|second|minute|hour|day|month|year)|CURRENTROW]
>     as alias,...[n])
>    )
>   .select( [col1,...[n]], (agg(col1) OVER overWindowAlias, … [n])
> {code}
> Implement restrictions:
> * All OVER clauses in the same SELECT clause must be exactly the same.
> * The PARTITION BY clause is optional (no partitioning results in single 
> threaded execution).
> * The ORDER BY Before the 
> [FLINK-5884|https://issues.apache.org/jira/browse/FLINK-5884]  implementation 
> orderBy may only have ‘rowtime/’proctime(for stream)/‘specific-time-field(for 
> batch).
> * FOLLOWING is not supported.
> I will soon add a user interface design document.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to