gemini-code-assist[bot] commented on code in PR #37590:
URL: https://github.com/apache/beam/pull/37590#discussion_r2818674616
##########
sdks/python/apache_beam/transforms/core.py:
##########
@@ -2408,10 +2424,54 @@ def check_threshold(bad, total, threshold,
window=DoFn.WindowParam):
if self._error_handler:
self._error_handler.add_error_pcollection(result[self._dead_letter_tag])
+ if self._extra_tags:
Review Comment:

The check `if self._extra_tags:` is problematic. If `with_outputs()` is
called without any side output tags (e.g., `with_outputs(main='main')`),
`_extra_tags` will be an empty tuple `()`, which evaluates to `False`. This
would cause the transform to incorrectly return a single `PCollection` instead
of a `DoOutputsTuple` as expected when `with_outputs()` is used.
To fix this, the condition should check if `_extra_tags` is not `None`,
which correctly indicates that `with_outputs()` has been called on the
exception handler.
```suggestion
if self._extra_tags is not None:
```
--
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]