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 2022/08/24 23:06:06 UTC

[GitHub] [beam] robertwb commented on a diff in pull request #22834: Yield BatchElement batches at end of window.

robertwb commented on code in PR #22834:
URL: https://github.com/apache/beam/pull/22834#discussion_r954367518


##########
sdks/python/apache_beam/transforms/window.py:
##########
@@ -376,6 +376,10 @@ def windowed_value(
     # type: (...) -> WindowedValue
     return WindowedValue(value, timestamp, (GlobalWindow(), ), pane_info)
 
+  @classmethod
+  def windowed_value_at_end_of_window(cls, value):
+    return cls.windowed_value(value, GlobalWindow().max_timestamp())

Review Comment:
   `end` is the exclusive end. We do want this to lie in the window in question, so max_timestamp is correct. 



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org