You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/02/17 19:17:32 UTC

[GitHub] [beam] y1chi commented on a change in pull request #14001: [BEAM-11824] Set merge status in WindowingStrategyTranslation

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



##########
File path: runners/core-construction-java/src/main/java/org/apache/beam/runners/core/construction/WindowingStrategyTranslation.java
##########
@@ -295,10 +299,17 @@ public static FunctionSpec toProto(WindowFn<?, ?> windowFn, SdkComponents compon
             .setAllowedLateness(windowingStrategy.getAllowedLateness().getMillis())
             .setTrigger(TriggerTranslation.toProto(windowingStrategy.getTrigger()))
             .setWindowFn(windowFnSpec)
-            .setAssignsToOneWindow(windowingStrategy.getWindowFn().assignsToOneWindow())
+            .setAssignsToOneWindow(windowFn.assignsToOneWindow())
+            .setMergeStatus(
+                windowFn instanceof InvalidWindows
+                    ? (((InvalidWindows) windowFn).getOriginalWindowFn().isNonMerging()

Review comment:
       probably stupid question: if the InvalidWindow only happens after GBK or combine, does the original window fn matter? should the MergeStatus always be ALREADY_MERGED for InvalidWindow? How should runner tread ALREADY_MERGED differently than NON_MERGING?




----------------------------------------------------------------
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:
users@infra.apache.org