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.