wuchong commented on a change in pull request #17015:
URL: https://github.com/apache/flink/pull/17015#discussion_r697340938



##########
File path: docs/content.zh/docs/dev/table/sql/queries/window-tvf.md
##########
@@ -282,4 +285,60 @@ Here is an example invocation on the Bid table:
 +------------------+------------------+-------+
 ```
 
+### Window offset

Review comment:
       ```suggestion
   ## Window Offset
   
   ```
   
   Add an empty line after the title

##########
File path: docs/content.zh/docs/dev/table/sql/queries/window-tvf.md
##########
@@ -282,4 +285,60 @@ Here is an example invocation on the Bid table:
 +------------------+------------------+-------+
 ```
 
+### Window offset
+`Offset` is an optional parameter which could be used to change the window 
assignment. It could be positive duration and negative duration. Default values 
for window offset is 0. The same record maybe assigned to the different window 
if set different offset value.                                                  
                            
+For example, which window would be assigned to for a record with timestamp 
`2021-06-30 00:00:04` for a Tumble window with 10 MINUTE as size?
+If `offset` value is `-16 MINUTE`,  the record assigns to window [`2021-06-29 
23:54:00`, `2021-06-30 00:04:00`).
+If `offset` value is `-6 MINUTE`, the record assigns to window [`2021-06-29 
23:54:00`, `2021-06-30 00:04:00`).
+If `offset` is `-4 MINUTE`, the record assigns to window [`2021-06-29 
23:56:00`, `2021-06-30 00:06:00`).
+If `offset` is `0`, the record assigns to window [`2021-06-30 00:00:00`, 
`2021-06-30 00:10:00`).
+If `offset` is `4 MINUTE`, the record assigns to window [`2021-06-29 
23:54:00`, `2021-06-30 00:04:00`).
+If `offset` is `6 MINUTE`, the record assigns to window [`2021-06-29 
23:56:00`, `2021-06-30 00:06:00`).
+If `offset` is `16 MINUTE`, the record assigns to window [`2021-06-29 
23:56:00`, `2021-06-30 00:06:00`).

Review comment:
       ```suggestion
   - If `offset` value is `-16 MINUTE`,  the record assigns to window 
[`2021-06-29 23:54:00`, `2021-06-30 00:04:00`).
   - If `offset` value is `-6 MINUTE`, the record assigns to window 
[`2021-06-29 23:54:00`, `2021-06-30 00:04:00`).
   - If `offset` is `-4 MINUTE`, the record assigns to window [`2021-06-29 
23:56:00`, `2021-06-30 00:06:00`).
   - If `offset` is `0`, the record assigns to window [`2021-06-30 00:00:00`, 
`2021-06-30 00:10:00`).
   - If `offset` is `4 MINUTE`, the record assigns to window [`2021-06-29 
23:54:00`, `2021-06-30 00:04:00`).
   - If `offset` is `6 MINUTE`, the record assigns to window [`2021-06-29 
23:56:00`, `2021-06-30 00:06:00`).
   - If `offset` is `16 MINUTE`, the record assigns to window [`2021-06-29 
23:56:00`, `2021-06-30 00:06:00`).
   ```
   
   Use list for better displaying. 




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to