Zhenhao Li created FLINK-22611:
----------------------------------
Summary: add documentation about the semantics of event time for
time window output
Key: FLINK-22611
URL: https://issues.apache.org/jira/browse/FLINK-22611
Project: Flink
Issue Type: Improvement
Reporter: Zhenhao Li
It seems that all windowed aggregation output receives the timestamp metadata
if event time is being used for the processing.
However, I couldn't find anything on the documentation pages about what
timestamp value each output gets. Intuitively, it makes sense to assume it is
the maximal timestamp from the input records of the window.
After digging in the source code, I got the impression that the timestamp of
the output is actually 1 millisecond before the window end time.
See
https://github.com/apache/flink/blob/99c2a415e9eeefafacf70762b6f54070f7911ceb/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/EvictingWindowOperator.java#L375
and
https://github.com/apache/flink/blob/99c2a415e9eeefafacf70762b6f54070f7911ceb/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/windowing/windows/TimeWindow.java#L84
Correct me if I'm wrong. If I'm right, I think we should add documentation
about it since this is very important because it is not uncommon to chain
multiple windowed processes. Understanding the timestamp semantics is critical
to the correctness of the code.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)