liferoad commented on code in PR #28595:
URL: https://github.com/apache/beam/pull/28595#discussion_r1333659417
##########
sdks/python/apache_beam/transforms/core.py:
##########
@@ -2272,17 +2276,24 @@ def __or__(self, transform):
return self.apply(transform)
def apply(self, transform):
- result = self._pcoll | transform.with_exception_handling(
- **self._exception_handling_args)
- if result[self.main_output_tag()].element_type == typehints.Any:
- result[self.main_output_tag()].element_type =
transform.infer_output_type(
- self._pcoll.element_type)
- # TODO(BEAM-18957): Add support for tagged type hints.
- result[self.error_output_tag()].element_type = typehints.Any
- return _PValueWithErrors(
- result[self.main_output_tag()],
- self._exception_handling_args,
- self._upstream_errors + (result[self.error_output_tag()], ))
+ if hasattr(transform, 'with_exception_handling'):
Review Comment:
any reason to add this if now?
--
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]