Thank you. I tried it out and it does pass elements to the stateful DoFn as and when they arrive instead of waiting for the window to finish, the way you describe.
However, with this, the FileIO does not write the file until the whole window is done, even though the stateful DoFn outputs iterables in chunks of 100MB. It only receives a single ON_TIME pane and writes a big file of the entire window. Wondering if there is a way to tell that each iterable is a separate pane or something like that.. >
