Timo Walther created FLINK-37402: ------------------------------------ Summary: 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
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)