[
https://issues.apache.org/jira/browse/FLINK-22737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17354878#comment-17354878
]
Timo Walther edited comment on FLINK-22737 at 6/1/21, 7:05 AM:
---------------------------------------------------------------
After thinking about this topic again, also from a usability perspective, NULL
is way easier to handle in SQL than Long.MIN_VALUE.
A SQL user cannot access the Long.MIN_VALUE constant and it cannot be declared
easily using a SQL literal like {{TIMESTAMP '-292275055-05-16 16:47:04.192'}}.
SQL users are used to handling NULLs.
By using {{TIMESTAMP '1970-01-01'}}, we would (again) relate {{LocalDateTime}}
and {{Instant}} semantics with each other and expose internal representations.
I see NULL as the only valid alternative. Otherwise I would rather vote for
returning BIGINT instead of any timestamp type.
was (Author: twalthr):
After thinking about this topic again, also from a usability perspective, NULL
is way easier to handle in SQL than Long.MIN_VALUE. A SQL user cannot access
the Long.MIN_VALUE constant and it cannot be declared easily using a SQL
literal like {{TIMESTAMP '-292275055-05-16 16:47:04.192'}}. SQL users are used
to handling NULLs.
> 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
> Attachments: screenshot-2021-05-31_14-22-43.png
>
>
> 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)