You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Jayendra (Jira)" <ji...@apache.org> on 2020/09/05 16:20:00 UTC
[jira] [Commented] (BEAM-10833) Error inferring type of tuple
output
[ https://issues.apache.org/jira/browse/BEAM-10833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17191080#comment-17191080 ]
Jayendra commented on BEAM-10833:
---------------------------------
With some pycharm debugging I was able to detect that error is due to registration of wrong coder, so for the first element of tuple in the example which is char/str the registered coder is `VarIntCoder` which is wrong. After some more debugging I found that serialised `BundleDescriptor` has that info, but I am struggling to find where this information is being filled.
> Error inferring type of tuple output
> ------------------------------------
>
> Key: BEAM-10833
> URL: https://issues.apache.org/jira/browse/BEAM-10833
> Project: Beam
> Issue Type: Bug
> Components: sdk-py-core
> Reporter: Robert Bradshaw
> Assignee: Jayendra
> Priority: P1
>
> {code:python}
> with beam.Pipeline() as p:
> class Foo(beam.DoFn):
> def process(self, element):
> k, v = element
> yield (k, {k:v})
> a = [('a',1), ('a',1), ('b',1)]
> input = p | beam.Create(a)
> print(input.element_type) # ok
> pcoll = input | beam.ParDo(Foo())
> print(pcoll.element_type) # claims Tuple[int, Dict[Any, Any]]
> # BOOM on run due to coder errors
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)