[
https://issues.apache.org/jira/browse/FLINK-24608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17441029#comment-17441029
]
Marios Trivyzas commented on FLINK-24608:
-----------------------------------------
The problem with *SinkUpsertMaterializer* is that currently it uses a state
which is a *List<RowData>* and not a *List<StreamRecord>,* therefore it
"looses" the timestamp info.
If we set the *timestamp* to the stream record before *SinkUpsertMaterializer*
then we need to either store *List<StreamRecord>,* thus increasing the size of
its state, or pass the column index of the timestamp
to *SinkUpsertMaterializer* so it can retrieve the *timestamp* and set it to
the result {*}StreamRecord{*}s, which somehow negates the point of setting the
timestamp beforehand.
> Sinks built with the unified sink framework do not receive timestamps when
> used in Table API
> --------------------------------------------------------------------------------------------
>
> Key: FLINK-24608
> URL: https://issues.apache.org/jira/browse/FLINK-24608
> Project: Flink
> Issue Type: Bug
> Components: Connectors / Common, Table SQL / Planner
> Affects Versions: 1.14.0, 1.13.3, 1.15.0
> Reporter: Fabian Paul
> Assignee: Marios Trivyzas
> Priority: Critical
>
> All sinks built with the unified sink framework extract the timestamp from
> the internal {{StreamRecord}}. The Table API does not facilitate the
> timestamp field in the {{StreamRecord}} but extracts the timestamp from the
> actual data.
> We either have to use a dedicated operator before all the sinks to simulate
> the behavior or allow a customizable timestamp extraction during the sink
> translation.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)