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 17:59:12 UTC

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

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


##########
sdks/python/apache_beam/transforms/util.py:
##########
@@ -541,15 +541,15 @@ def process(self, element):
     self._running_batch_size += self._element_size_fn(element)
     if self._running_batch_size >= self._target_batch_size:
       with self._batch_size_estimator.record_time(self._running_batch_size):
-        yield self._batch
+        yield window.GlobalWindows.windowed_value_at_end_of_window(self._batch)

Review Comment:
   We could allow configuration of this with a TimestampCombiner, but I'd consider that more a feature request than a bug fix. This seems, by default, the safest thing to do in the global window. (Even if we preserved the latest timestamp, there's no limit to how far back the earliest dropped timestamp might be.)



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