beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luke Cwik (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (BEAM-2989) Improve coder inference for WithKeys.of(null)
Date Tue, 03 Oct 2017 18:42:01 GMT

     [ https://issues.apache.org/jira/browse/BEAM-2989?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Luke Cwik resolved BEAM-2989.
-----------------------------
       Resolution: Fixed
    Fix Version/s: 2.2.0

> Improve coder inference for WithKeys.of(null)
> ---------------------------------------------
>
>                 Key: BEAM-2989
>                 URL: https://issues.apache.org/jira/browse/BEAM-2989
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-java-core
>            Reporter: Luke Cwik
>            Assignee: Daniel Oliveira
>            Priority: Minor
>             Fix For: 2.2.0
>
>
> WithKeys.<Void, String>of((Void) null)) should choose a VoidCoder as the key coder
instead of erroring out.
> {code:java}
> java.lang.IllegalStateException: Unable to return a default Coder for
> <transform> [PCollection]. Correct one of the following root causes:
>   No Coder has been manually specified;  you may do so using .setCoder().
>   Inferring a Coder from the CoderRegistry failed: Cannot provide coder for
> parameterized type org.apache.beam.sdk.values.KV<K, V>: Unable to provide a
> Coder for K.
> {code}
> [WithKeysTest#testConstantKeys|https://github.com/apache/beam/blob/352f106f992a2ff4c08274685657242f04f967ef/sdks/java/core/src/test/java/org/apache/beam/sdk/transforms/WithKeysTest.java#L87]
but using a Void key type should pass coder inference.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message