Luke Cwik created BEAM-2989:
-------------------------------

             Summary: 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


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)

Reply via email to