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 2020/06/25 18:30:58 UTC

[GitHub] [beam] aaltay commented on a change in pull request #12088: Add output typehints to GroupIntoBatches

aaltay commented on a change in pull request #12088:
URL: https://github.com/apache/beam/pull/12088#discussion_r445756416



##########
File path: sdks/python/apache_beam/transforms/util.py
##########
@@ -741,6 +741,7 @@ def WithKeys(pcoll, k):
 
 @experimental()
 @typehints.with_input_types(Tuple[K, V])
+@typehints.with_output_types(Tuple[K, List[V]])

Review comment:
       I wonder why the `test_in_global_window` tests passes. The assert following that code is seemingly checking for the right batching.
   
   The implementation matches the Java one (https://github.com/apache/beam/blob/master/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/GroupIntoBatches.java#L70). I _think_ grouping by key is supposed to happen as part of the state api, because element_state will be keyed by key and window.




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