[
https://issues.apache.org/jira/browse/FLINK-23858?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17410942#comment-17410942
]
Piotr Nowojski commented on FLINK-23858:
----------------------------------------
I've chatted offline with Stephan about this one, and the rationale behind
encoding no timestamp as {{Long.MIN_VALUE}} was to unify things and simplify
the code a bit, but they have indeed didn't think about the batch case. All in
all if we special treat this case in {{StreamElementSerializer}} it shouldn't
complicate the code that much, so +1 from our side on reverting this back.
> Clarify StreamRecord#timestamp.
> -------------------------------
>
> Key: FLINK-23858
> URL: https://issues.apache.org/jira/browse/FLINK-23858
> Project: Flink
> Issue Type: Improvement
> Components: Runtime / Network
> Reporter: Arvid Heise
> Priority: Major
>
> The new Source apparently changed the way we specify records without
> timestamps. Previously, we used separate methods to create and maintain
> timestamp-less records.
> Now, we are shiftings towards using a special value
> (TimeStampAssigner#NO_TIMESTAMP).
> We first of all need to document that somewhere; at the very least in the
> JavaDoc of StreamRecord.
> We should also revise the consequences:
> - Do we want to encode it in the {{StreamElementSerializer}}? Currently, we
> use a flag to indicate no-timestamp on the old path but in the new path we
> now use 9 bytes to encode NO_TIMESTAMP.
> - We should check if all code-paths deal with `hasTimestamp() == true &&
> getTimestamp() == TimeStampAssigner#NO_TIMESTAMP`, in particular with sinks.
> Do we want to deprecate `hasTimestamp` and related methods?
--
This message was sent by Atlassian Jira
(v8.3.4#803005)