[ 
https://issues.apache.org/jira/browse/FLINK-37402?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Timo Walther closed FLINK-37402.
--------------------------------
    Fix Version/s: 2.1.0
       Resolution: Fixed

Fixed in master: d5ffb88df4d033b357a72a3def6d45ebc80ea254

> SQL testing sources produce incorrect watermarks
> ------------------------------------------------
>
>                 Key: FLINK-37402
>                 URL: https://issues.apache.org/jira/browse/FLINK-37402
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Planner
>            Reporter: Timo Walther
>            Assignee: Timo Walther
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 2.1.0
>
>
> While implementing FLINK-37302, I noticed that both 
> {{TestValuesRuntimeFunctions}} and {{TestSourceFunction}} don't emit 
> watermarks correctly.
> Per-record watermarks should be emitted after the record has been emitted. 
> This is in sync with TimestampsAndWatermarksOperator:
> {code}
>     @Override
>     public void processElement(final StreamRecord<T> element) throws 
> Exception {
>         final T event = element.getValue();
>         final long previousTimestamp =
>                 element.hasTimestamp() ? element.getTimestamp() : 
> Long.MIN_VALUE;
>         final long newTimestamp = timestampAssigner.extractTimestamp(event, 
> previousTimestamp);
>         element.setTimestamp(newTimestamp);
>         output.collect(element);
>         watermarkGenerator.onEvent(event, newTimestamp, wmOutput);
>     }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to