This is an automated email from the ASF dual-hosted git repository.
jrmccluskey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new 084c4da7314 Revert "fix(python): Register all output pcollections of a
transform rather t…" (#37801)
084c4da7314 is described below
commit 084c4da731485912f834ac0f523979ed31ad2303
Author: claudevdm <[email protected]>
AuthorDate: Tue Mar 10 11:45:21 2026 -0400
Revert "fix(python): Register all output pcollections of a transform rather
t…" (#37801)
This reverts commit 6a1618eca88ec88b9ebcb17336b39ae37d8ee500.
---
sdks/python/apache_beam/pipeline.py | 5 ++---
sdks/python/apache_beam/pipeline_test.py | 7 +++----
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/sdks/python/apache_beam/pipeline.py
b/sdks/python/apache_beam/pipeline.py
index 7446f9df38c..3cce2c5bb77 100644
--- a/sdks/python/apache_beam/pipeline.py
+++ b/sdks/python/apache_beam/pipeline.py
@@ -829,10 +829,9 @@ class Pipeline(HasDisplayData):
assert isinstance(result.producer.inputs, tuple)
if isinstance(result, pvalue.DoOutputsTuple):
- all_tags = [result._main_tag] + list(result._tags)
- for tag in all_tags:
+ for tag, pc in list(result._pcolls.items()):
if tag not in current.outputs:
- current.add_output(result[tag], tag)
+ current.add_output(pc, tag)
continue
# If there is already a tag with the same name, increase a counter for
diff --git a/sdks/python/apache_beam/pipeline_test.py
b/sdks/python/apache_beam/pipeline_test.py
index ac3e6ac4afc..b28fe3c3d14 100644
--- a/sdks/python/apache_beam/pipeline_test.py
+++ b/sdks/python/apache_beam/pipeline_test.py
@@ -1648,10 +1648,9 @@ class RunnerApiTest(unittest.TestCase):
all_applied_transforms[xform.full_label] = xform
current_transforms.extend(xform.parts)
xform = all_applied_transforms['Split Sales']
- # Confirm that Split Sales correctly has three outputs: the main
- # (untagged) output plus the two tagged outputs specified by
- # ParDo.with_outputs in ParentSalesSplitter.
- assert len(xform.outputs) == 3
+ # Confirm that Split Sales correctly has two outputs as specified by
+ # ParDo.with_outputs in ParentSalesSplitter.
+ assert len(xform.outputs) == 2
if __name__ == '__main__':