beyond1920 edited a comment on pull request #16215: URL: https://github.com/apache/flink/pull/16215#issuecomment-868182128
@wenlong88 Window offset has no effect on watermark. Whether it would effect time attribute depends on each window operator. For window aggregate, time attribute is (window_end - 1). window_end would be shifted if set window offset. For example, if user needs to calculate PV every 1 hour, but wanna window begin at 05:00 instead of 00:00 of each hour. The sql is as following. window offset is 5 minute, it would not effect on watermark, rowtime attribute would be at YYYY-MM-DD hh:04:59.999Z instead of YYYY-MM-DD hh-1:59:59.999Z. ` SELECT `product`, window_start, window_end, COUNT(`user`) AS pv FROM TABLE( TUMBLE(TABLE temp_table, DESCRIPTOR(rowtime), INTERVAL '1' HOUR, INTERVAL '5' MINUTE)) GROUP BY product, window_start, window_end ` I add a cascaded window aggregate with window offset in `WindowAggregateITCase#testCascadeEventTimeTumbleWindowWithOffset`, please have a look. Thanks a lot. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org