Actually, my above claim isn't as strong as it can be. A value in no windows is considered to not exist. Values that are not assigned to any window can be dropped by a runner at *any time*. A WindowFn *must* assign all elements to at least one window. All elements that are produced by any PTransform (including Sources) must be in a window, potentially the GlobalWindow.
On Wed, Apr 13, 2016 at 8:52 AM, Thomas Groh <[email protected]> wrote: > Values should almost always be part of at least one window. WindowFns > should place all elements in at least one window, as values that are in no > windows will be dropped when they reach a GroupByKey. > > Elements in no windows, for example those created by > WindowedValue.valueInEmptyWindows(T) are generally an implementation > detail of a transform; for example, in the InProcessPipelineRunner, the KV<K, > Iterable<WindowedValue<V>>> elements output by a GroupByKeyOnly are in > empty windows - but by the time the element reaches the boundary of the > GroupByKey, the elements are reassigned to the appropriate window(s). > > On Tue, Apr 12, 2016 at 11:44 PM, Amit Sela <[email protected]> wrote: > >> My instinct tells me that if a value does not belong to a specific window >> (in time) it's a part of a global window, but if so, what's the role of >> the >> "empty window". When should an element be a "value in an empty window" ? >> > >
