Hi Paul, Elements are returned in the order they were added in the window. No sorting on timestamp is performed.
Hope this helps, Kostas > On Aug 9, 2016, at 10:22 PM, Paul Joireman <paul.joire...@physiq.com> wrote: > > When you are using a window function the docs: > > https://ci.apache.org/projects/flink/flink-docs-master/apis/streaming/windows.html#windowfunction---the-generic-case > > <https://ci.apache.org/projects/flink/flink-docs-master/apis/streaming/windows.html#windowfunction---the-generic-case> > > state that > > A WindowFunction gets an Iterable containing all the elements of the window > being processed > > If the input data stream is timestamped using event times where the events > can come in out of chronological order, are the events returned by the > interator the same order as they were added? Or does the window sort them > internally on timestamp and return them through the iterator in timestamp > chronological order? > > Paul