y1chi commented on a change in pull request #14059:
URL: https://github.com/apache/beam/pull/14059#discussion_r583297512



##########
File path: 
sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/windowing/Window.java
##########
@@ -332,7 +332,7 @@
   public WindowingStrategy<?, ?> 
getOutputStrategyInternal(WindowingStrategy<?, ?> inputStrategy) {
     WindowingStrategy<?, ?> result = inputStrategy;
     if (getWindowFn() != null) {
-      result = result.withWindowFn(getWindowFn());
+      result = result.withAlreadyMerged(false).withWindowFn(getWindowFn());

Review comment:
       I'm not sure if we can safely assume getWindowFn() is always non-null. 
Wouldn't it be safer to set already merged directly like WindowingStrategy<?, 
?> result = inputStrategy.withAlreadyMerged(false)?




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to