TheNeuralBit commented on a change in pull request #17175:
URL: https://github.com/apache/beam/pull/17175#discussion_r837999264



##########
File path: sdks/python/apache_beam/pipeline.py
##########
@@ -789,6 +797,10 @@ def _infer_result_type(
       # Any remaining type variables have no bindings higher than this scope.
       result_pcollection.element_type = typehints.bind_type_variables(
           result_element_type, {'*': typehints.Any})
+      # TODO: Where should we actually do this?
+      if isinstance(transform, ParDo):
+        transform.infer_batch_converter(input_element_type, input_batch_type)
+        result_pcollection.batch_type = transform.infer_output_batch_type()

Review comment:
       It's insufficient to rely on the next DoFn to resolve this batch 
converter. We need to track an output_batch_converter for the DoFn.
   
   What if the output is a Flatten or there's a fusion break (to test this add 
a side input between a and b).




-- 
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]


Reply via email to