rohdesamuel commented on a change in pull request #11283: [BEAM-9322] 
[BEAM-1833] Better naming for composite transform output tags.
URL: https://github.com/apache/beam/pull/11283#discussion_r401967131
 
 

 ##########
 File path: sdks/python/apache_beam/pipeline.py
 ##########
 @@ -671,7 +671,11 @@ def apply(
         # If the user wants the old implementation of always generated
         # PCollection output ids, then set the tag to None first, then count up
         # from 1.
-        tag = len(current.outputs) if None in current.outputs else None
+        base = tag
+        counter = 0
+        while tag in current.outputs:
+          counter += 1
+          tag = '%s_%d' % (base, counter)
         current.add_output(result, tag)
 
 Review comment:
   Should this be under the experiment flag instead, so that we don't 
inadvertently break anyone?

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


With regards,
Apache Git Services

Reply via email to