yifanmai commented on a change in pull request #13432:
URL: https://github.com/apache/beam/pull/13432#discussion_r532998837
##########
File path:
sdks/python/apache_beam/runners/portability/fn_api_runner/translations.py
##########
@@ -557,8 +557,13 @@ def add_parent(child, parent):
pipeline_proto.components.transforms[parent])
copy_output_pcollections(components.transforms[parent])
del components.transforms[parent].subtransforms[:]
- add_parent(parent, parents.get(parent))
+ # Ensure that child is the lsat item in the parent's subtransforms.
+ # This is required to maintain topological order with sort_stages.
Review comment:
Rephrased to make this clearer (topological order is maintained only if
sort_stages was previously called).
----------------------------------------------------------------
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]