tvalentyn commented on a change in pull request #13048:
URL: https://github.com/apache/beam/pull/13048#discussion_r503585072
##########
File path: sdks/python/apache_beam/transforms/core.py
##########
@@ -1970,10 +1985,14 @@ def add_input_types(transform):
return combined
if self.has_defaults:
- combine_fn = (
- self.fn if isinstance(self.fn, CombineFn) else
- CombineFn.from_callable(self.fn))
- default_value = combine_fn.apply([], *self.args, **self.kwargs)
+ combine_fn = copy.copy(
Review comment:
I see. I wonder if calling setup/teardown on during pipeline submission
may be undesireable in some cases.
One option to offer flexibility is to use introduce default_value() method
in CombineFn, and move the setup/teardown call in that method, trying this out
in: https://github.com/apache/beam/pull/13081.
----------------------------------------------------------------
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]