claudevdm commented on code in PR #37593:
URL: https://github.com/apache/beam/pull/37593#discussion_r2806416097
##########
sdks/python/apache_beam/typehints/decorators.py:
##########
@@ -546,12 +547,22 @@ def extract_tagged_outputs(self):
A copy of this instance with TaggedOutput members moved from the main
output type into the output kwargs dict.
"""
+ opts = get_pipeline_options()
+ if opts and opts.is_compat_version_prior_to("2.72.0"):
+ return self
if self.output_types is None or not self.has_simple_output_type():
return self
- output_type = self.output_types[0][0]
+ # Tags already set via decorator/chain style — nothing to extract.
+ if self.output_types[1]:
+ return self
+ output_type = self.output_types[0][0]
clean_type, extracted_tags = _extract_tagged_from_type(output_type)
- if not extracted_tags:
+
+ # If no tags were extracted, only return if the type is also unchanged.
Review Comment:
I will follow up with a changes.md entry in a separate PR
--
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]