[
https://issues.apache.org/jira/browse/BEAM-2989?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16190126#comment-16190126
]
ASF GitHub Bot commented on BEAM-2989:
--------------------------------------
Github user asfgit closed the pull request at:
https://github.com/apache/beam/pull/3922
> 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)