Hi Caiyi,

I think if the image shows all the records, after the change we should only have
the watermark at 16:05, which is still not be able to trigger the window of 5 
minutes?

Best,
Yun



 ------------------Original Mail ------------------
Sender:cy <caiyi_2...@126.com>
Send Date:Thu Dec 23 15:44:23 2021
Recipients:Yun Gao <yungao...@aliyun.com>
CC:'user@flink.apache.org' <user@flink.apache.org>
Subject:Re:Re: Window Aggregation and Window Join ability not work properly

I change to 
watermark for `datatime` as `datatime` - interval '1' second
or
watermark for `datatime` as `datatime`
but is still not work.





At 2021-12-23 15:16:20, "Yun Gao" <yungao...@aliyun.com> wrote:
Hi Caiyi,

The window need to be finalized with watermark[1]. I noticed that the watermark 
defined
 is `datatime` - INTERVAL '5' MINUTE,  it means the watermark emitted would be 
the 
maximum observed timestamp so far minus 5 minutes [1]. Therefore, if we want to 
trigger the window of 16:00 ~ 16:05, there should be one record with datetime 
>= 16:10 
get processed, then the source would emit the watermark >= 16:05 to finalize 
the window,
otherwise there would be no output due to no window is finalized.

Best,
Yun


[1] 
https://nightlies.apache.org/flink/flink-docs-release-1.14/docs/dev/table/sql/create/#watermark
 ------------------Original Mail ------------------
Sender:cy <caiyi_2...@126.com>
Send Date:Thu Dec 23 09:52:40 2021
Recipients:'user@flink.apache.org' <user@flink.apache.org>
Subject:Window Aggregation and Window Join ability not work properly

Hi
Flink 1.14.2Scala 2.12

I'm using flink sql window aggregation and window join ability,  I write the 
sql as documentation said but is not work. Here is my schema and sql
schema:


sql;
SELECT window_start, window_end, COUNT(*)
FROM TABLE(
    TUMBLE(TABLE `origin`.`queue_3_ads_ccops_sdn_vrs_result`, 
DESCRIPTOR(datatime), INTERVAL '5' MINUTES))
GROUP BY window_start, window_end;

result:


data:



Similar with window join ability.

So is anything wrong with this two abilities?

Need your help, thank you.












Reply via email to