TheNeuralBit commented on code in PR #21844:
URL: https://github.com/apache/beam/pull/21844#discussion_r897113202
##########
sdks/python/apache_beam/transforms/batch_dofn_test.py:
##########
@@ -46,6 +46,17 @@ def process_batch(self, batch: List[int], *args, **kwargs):
yield [element * 2 for element in batch]
+class BatchDoFnOverrideTypeInference(beam.DoFn):
+ def process_batch(self, batch, *args, **kwargs):
+ yield [element * 2 for element in batch]
+
+ def get_input_batch_type(self, input_element_type):
+ return List[input_element_type]
+
+ def get_output_batch_type(self, input_element_type):
+ return List[input_element_type]
Review Comment:
Yes, users may want to do that. This is fine as-is for our purposes since
it's just a test.
--
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]