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/12/16 00:11:16 UTC

[GitHub] [beam] TheNeuralBit commented on a change in pull request #16099: Clarify CoGroupByKey creates Iterable, not list.

TheNeuralBit commented on a change in pull request #16099:
URL: https://github.com/apache/beam/pull/16099#discussion_r770131398



##########
File path: sdks/python/apache_beam/transforms/util.py
##########
@@ -110,25 +110,29 @@ class CoGroupByKey(PTransform):
                              ...],
                     'tag2': ... ,
                     ... })
+  
+  where `[]` refers to an iterable, not a list.
 
   For example, given::
 
       {'tag1': pc1, 'tag2': pc2, 333: pc3}
 
   where::
 
-      pc1 = [(k1, v1)]
-      pc2 = []
-      pc3 = [(k1, v31), (k1, v32), (k2, v33)]
+      pc1 = beam.Create([(k1, v1)]))
+      pc2 = beam.Create([])
+      pc3 = beam.Create([(k1, v31), (k1, v32), (k2, v33)])
 
-  The output PCollection would be::
+  The output PCollection would consists of items::

Review comment:
       nit:
   ```suggestion
     The output PCollection would consist of items::
   ```




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