[ https://issues.apache.org/jira/browse/FLINK-22737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17353304#comment-17353304 ]
Jark Wu commented on FLINK-22737: --------------------------------- Hi [~airblader], [~twalthr], I prefer to return TIMESTAMP/LTZ rather than BIGINT, because as said in the JIRA description, it is mainly used to compare with event time to determine late events. So a same type with event time attribute would make the comparison easier and less error-prone (no conversion). What about asking {{CURRENT_WATERMARK}} to accept an event-time attribute argument? I believe the event-time column should exist if users want to access watermark. This can make event time column and CURRENT_WATERMARK return same type, also avoid returning NULL values. > Add support for CURRENT_WATERMARK to SQL > ---------------------------------------- > > Key: FLINK-22737 > URL: https://issues.apache.org/jira/browse/FLINK-22737 > Project: Flink > Issue Type: Sub-task > Components: Table SQL / API > Reporter: David Anderson > Assignee: Ingo Bürk > Priority: Major > > With a built-in function returning the current watermark, one could operate > on late events without resorting to using the DataStream API. > Called with zero parameters, this function returns the current watermark for > the current row – if there is an event time attribute. Otherwise, it returns > NULL. -- This message was sent by Atlassian Jira (v8.3.4#803005)