If there is no input to a combiner (e.g. you pass it an empty PCollection), a default value is produced (the Combine function tells Beam what it's default value is). Logically, the windowed-extension of this would be to produce a default value whenever there is no data for a window. The problem is that in Beam, windows are created in response to elements, which means that Beam doesn't really have a way to know that a window should have existed if there is no data in that window (since logically that window doesn't exist).
One could imagine implementing this for certain well-known window types such as FixedWindows. However in general (any custom window type or even built-in windows such as SessionWindows) the concept of an empty window doesn't make sense. Reuven On Mon, Feb 10, 2025 at 3:05 PM Joey Tran <joey.t...@schrodinger.com> wrote: > I'm trying to work with windows and I was hoping my current batch > workflows could work transparently with and without windows (I know > "without windows" really means with GlobalWindows), but any batch workflow > that uses a `CombineGlobally` doesn't work without using `without_defaults` > otherwise it gets the following error > > > Default values are not yet supported in CombineGlobally() if the output > PCollection is not windowed by GlobalWindows.... > > If a batch workflow uses a composite transform that contains a > `CombineGlobally`, I think there is no solution. > > What exactly are these combiner defaults? Can `.without_defaults` be the > "default" setting of CombineGlobally? It's unfortunate to have to consider > the non-global window case explicitly and add these `.without_defaults()` > > >