damccorm commented on code in PR #41162:
URL: https://github.com/apache/beam/pull/41162#discussion_r4528305201
##########
sdks/python/apache_beam/runners/common.py:
##########
@@ -1765,11 +1765,22 @@ def handle_process_batch_outputs(
then dispatched to the appropriate indexed output.
"""
if results is None:
- results = []
+ if self.per_element_output_counter is not None:
+ self.per_element_output_counter.add_input(0)
+ return
output_element_count = 0
+ empty_windowed_value = (
+ windowed_input_batch.as_empty_windowed_value()
+ if self._process_batch_yields_elements else None)
for result in results:
- tag, result = self._handle_tagged_output(result)
+ if isinstance(result, TaggedOutput):
+ tag = result.tag
+ if not isinstance(tag, str):
+ raise TypeError('In %s, tag %s is not a string' % (self, tag))
+ result = result.value
+ else:
+ tag = None
Review Comment:
How does inlining this make things faster?
--
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]