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

Reuven Lax commented on BEAM-9569:
----------------------------------

This failure is not related to POJOs

The actual problem is that MapElements (in the logRecords function) isn't 
setting an output schema, and we don't automatically propagate the input schema 
to the output in this case. For some reason Beam insists on having a Coder, 
even though the PCollection generated by logRecords is not used. In the past 
Beam "found" SerializableCoder as an alternative. SerializableCoder is not 
really a valid coder for Row, but since nobody ever consumed this PCollection, 
it didn't matter.

A simple fix here would be to change the MapElements output type to be Void. 
Even better - there is no reason for logRecords to return the input PCollection 
in this case, so probably this test should've instead had a logging ParDo that 
produced no output.

> Coder inference should be disabled for Row types
> ------------------------------------------------
>
>                 Key: BEAM-9569
>                 URL: https://issues.apache.org/jira/browse/BEAM-9569
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-java-core
>            Reporter: Reuven Lax
>            Assignee: Reuven Lax
>            Priority: Major
>             Fix For: 2.21.0
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> Coder inference will pick up SerializableCoder, which is incorrect. We should 
> always be using schemas.



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

Reply via email to