[ 
https://issues.apache.org/jira/browse/BEAM-12413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17387495#comment-17387495
 ] 

Beam JIRA Bot commented on BEAM-12413:
--------------------------------------

This issue is P2 but has been unassigned without any comment for 60 days so it 
has been labeled "stale-P2". If this issue is still affecting you, we care! 
Please comment and remove the label. Otherwise, in 14 days the issue will be 
moved to P3.

Please see https://beam.apache.org/contribute/jira-priorities/ for a detailed 
explanation of what these priorities mean.


> Type inference works incorrectly with tuple slices
> --------------------------------------------------
>
>                 Key: BEAM-12413
>                 URL: https://issues.apache.org/jira/browse/BEAM-12413
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-py-core
>            Reporter: Dmytro Kozhevin
>            Priority: P2
>              Labels: stale-P2
>
> 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.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to