egalpin commented on issue #21690: URL: https://github.com/apache/beam/issues/21690#issuecomment-1157623959
Ok so I did a little more digging for the sake of my own understanding and I think I have a much better grasp of what `setWindowingStrategyInternal` is used for. It seems to be intended simply for cases where the programmer knows that the data contained in a new PCollection has a specific the same WindowingStrategy as a prior PCollection i.e. the data type and window type are known to be the same in a new PCollection as they were in a previously known PCollection. Ex in Window.into[1]. `setWindowingStrategyInternal` is not meant to be used to _actively restore_ i.e. re-apply a WindowFn, rather it's used to indicate that a previously applied WindowFn is already suitable. I feel I have better clarity on why re-applying (i.e. `Window.into(<priorWindowFn>)`) resolves this issue. I would like to recommend that the fix in https://github.com/apache/beam/pull/21895 be the preferred path forward. [1] https://github.com/apache/beam/blob/29f30b3605824a47cbc68229f63af44a34cf0885/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/windowing/Window.java#L404-L408 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
