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

yinhua.dai edited comment on FLINK-6473 at 3/23/18 9:31 AM:
------------------------------------------------------------

My requirement is to calculate based on an incremental size window for a batch 
table.

For example, the first window has 1 row, the second window has 2 rows(including 
1 row from the 1st window and a new row), then 3 rows in the 3rd 
window(including 2 rows from the 2nd window and a new row), and so on.

For example:

Source table:
||datetime||productId||price||
|3-1|p1|10|
|3-2|p1|20|
|3-3|p1|30|
|3-4|p1|40|

Result table:
||datetime||productId||average||
|3-1|p1|10/1|
|3-2|p1|(10+20)/2|
|3-3|p1|(10+20+30)/3|
|3-4|p1|(10+20+30+40)/4|

 

I am trying to find a way to implement this requirement with Sql, to me seems 
the OVER action can do that but not yet implemented in flink, so I need an 
alternative way.


was (Author: yinhua):
My requirement is to calculate based on an incremental size window for a batch 
table.

For example, the first window has 1 row, the second window has 2 rows(including 
1 row from the 1st window and a new row), then 3 rows(including 2 rows from the 
2nd window and a new row), and so on.

Source table:
||datetime||productId||price||
|3-1|p1|10|
|3-2|p1|20|
|3-3|p1|30|
|3-4|p1|40|

Result table:
||datetime||productId||average||
|3-1|p1|10/1|
|3-2|p1|(10+20)/2|
|3-3|p1|(10+20+30)/3|
|3-4|p1|(10+20+30+40)/4|

 

I am trying to find a way to implement this requirement with Sql, to me seems 
the OVER action can do that but not yet implemented in flink, so I need an 
alternative way.

> Add OVER window support for batch tables
> ----------------------------------------
>
>                 Key: FLINK-6473
>                 URL: https://issues.apache.org/jira/browse/FLINK-6473
>             Project: Flink
>          Issue Type: New Feature
>          Components: Table API & SQL
>            Reporter: Fabian Hueske
>            Priority: Major
>
> Add support for OVER windows for batch tables. 
> Since OVER windows are supported for streaming tables, this issue is not 
> about the API (which is available) but about adding the execution strategies 
> and translation for OVER windows on batch tables.



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

Reply via email to