[ https://issues.apache.org/jira/browse/FLINK-24877?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17442542#comment-17442542 ]
Jingsong Lee edited comment on FLINK-24877 at 11/12/21, 6:46 AM: ----------------------------------------------------------------- > This means that any timestamp can be used a time attribute. -Do you mean that if I define two timestamp fields, the first one will be used for time attribute?- I see, users can use any timestamp as time attribute to create window functions. (This is really conducive to the initial experience and testing of users) was (Author: lzljs3620320): > This means that any timestamp can be used a time attribute. -Do you mean that if I define two timestamp fields, the first one will be used for time attribute?- I see, users can use any timestamp as time attribute to create window functions. > Implicitly add time attributes for VALUES clause > ------------------------------------------------ > > Key: FLINK-24877 > URL: https://issues.apache.org/jira/browse/FLINK-24877 > Project: Flink > Issue Type: Improvement > Components: Table SQL / API > Reporter: Timo Walther > Priority: Major > > This might be a big change that we cannot do due to backwards compatibility. > But I would like to at least log the idea and hear the opinions of others. > In theory, we could make all top-level timestamp columns of the {{VALUES}} > clause time attributes. Since VALUES are always bounded, a watermark strategy > is implicitly added with MAX WATERMARK at the end. This means that any > timestamp can be used a time attribute. > Given the following example: > {code} > VALUES > (1, 'name 1', TIMESTAMP '2020-03-08 13:12:11.123', 100, 41, 'payload 1'), > (2, 'name 2', TIMESTAMP '2020-03-09 13:12:11.123', 101, 42, 'payload 2'), > (3, 'name 3', TIMESTAMP '2020-03-10 13:12:11.123', 102, 43, 'payload 3'), > (2, 'name 2', TIMESTAMP '2020-03-11 13:12:11.123', 101, 42, 'payload') > {code} > We could define windows or interval joins for testing or examples. It would > make the starting experience nicer. With UNION ALL a user can have a minimum > set of records in an otherwise streaming pipeline (if checkpointing finished > tasks is enabled). -- This message was sent by Atlassian Jira (v8.20.1#820001)