Hi,
I'm looking into using the GroupAlsoByWindowViaWindowSetDoFn to accumulate
the windowed state with the elements arriving one by one (stream).
Once the window is complete, I would like to emit an Iterable<V> or another
form of aggregation of the elements. Is the following supposed to lead to
merging of current element with previously received elements for the same
window:
KeyedWorkItem<K, V> kwi = KeyedWorkItems.elementsWorkItem(
kv.getKey(),
Collections.singletonList(updatedWindowedValue));
context.setElement(kwi, getStateInternalsForKey(kwi.key()));
fn.processElement(context);
The input here are always single elements.
Thanks,
Thomas