You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "Davor Bonaci (JIRA)" <ji...@apache.org> on 2016/02/24 20:43:18 UTC

[jira] [Updated] (BEAM-44) Return the input coder in NullableCoder.of() if it is a NullableCoder

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

Davor Bonaci updated BEAM-44:
-----------------------------
    Assignee: Thomas Groh  (was: Davor Bonaci)

> Return the input coder in NullableCoder.of() if it is a NullableCoder
> ---------------------------------------------------------------------
>
>                 Key: BEAM-44
>                 URL: https://issues.apache.org/jira/browse/BEAM-44
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-java-core
>            Reporter: Thomas Groh
>            Assignee: Thomas Groh
>            Priority: Trivial
>
> NullableCoder.of(NullableCoder.of(foo)) returns a nested Nullable Coder, which appends two "present" bytes before null values. The second coder is unnecessary, and does not need to be provided. Instead, in the factory method, return the input coder if it is a Nullable coder
> NullableCoder<T> of(Coder<T> coder) {
>   if (coder instanceof NullableCoder) return coder;
> }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)