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

   Returning a slice of the tuple doesn't alter the type inference output. For 
example:
     
   `@beam.typehints.with_output_types(Tuple[int, str])`
   `class Foo(beam.DoFn):`
   `  def process(self, a):`
   `    yield a, str(a)`
   `pcoll = beam.Pipeline() `| beam.Create([1]) | beam.ParDo(Foo()) | 
beam.Map(lambda x: x[1:])
   `print(pcoll.element_type)`
     
    This prints Tuple[int, str], while the real type is str. At worst, this 
should return Any.
   
   Imported from Jira 
[BEAM-12413](https://issues.apache.org/jira/browse/BEAM-12413). Original Jira 
may contain additional context.
   Reported by: dmkozh.


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