tvalentyn commented on code in PR #30744:
URL: https://github.com/apache/beam/pull/30744#discussion_r1542176252


##########
sdks/python/apache_beam/transforms/core.py:
##########
@@ -1907,7 +1907,9 @@ def FlatMap(fn = identity, *args, **kwargs):  # pylint: 
disable=invalid-name
 
   The callable must return an iterable for each element of the input
   :class:`~apache_beam.pvalue.PCollection`. The elements of these iterables 
will
-  be flattened into the output :class:`~apache_beam.pvalue.PCollection`.
+  be flattened into the output :class:`~apache_beam.pvalue.PCollection`. If
+  no callable is given, then all elements of the input PCollection must already
+  be iterables themselves and will be flattened into the output PCollection.

Review Comment:
   Thank you! could you please also update 
https://beam.apache.org/documentation/transforms/python/elementwise/flatmap/ ? 
If you are interested, feel free to add an example of flattening lists nested 
in a pcoll (no need to strictly follow the 'gardening' theme).



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to