TheNeuralBit opened a new issue, #22197:
URL: https://github.com/apache/beam/issues/22197

   ### What happened?
   
   When determining the element_type for the PCollection output from a 
DoFn.process with `@yields_batchhes`, we incorrectly use the _batch_ typehint. 
This affects Beam 2.40.0.
   
   Relates to #21656
   Part of #21650
   
   For example: when applying a DoFn like:
   
   ```py
   class ElementToBatchDoFn(beam.DoFn):                                         
   
      @beam.DoFn.yields_batches                                                 
    
      def process(self, element: int) -> Iterator[List[int]]:      
        yield [element] * element                                               
    
                                                                                
    
      def infer_output_type(self, input_element_type):                          
    
        return input_element_type 
   ```
   
   We indicated that the output PCollection has `element_type` `List[int]` (the 
batch type), instead of `int` (the element type).
   
   ### Issue Priority
   
   Priority: 2
   
   ### Issue Component
   
   Component: sdk-py-core


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