[ https://issues.apache.org/jira/browse/FLINK-37402?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated FLINK-37402: ----------------------------------- Labels: pull-request-available (was: ) > 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 > > 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)