beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (BEAM-44) Return the input coder in NullableCoder.of() if it is a NullableCoder
Date Wed, 06 Apr 2016 17:38:25 GMT

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

ASF GitHub Bot commented on BEAM-44:
------------------------------------

Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-beam/pull/136


> 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 {{NullableCoder}}, 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 already
a {{NullableCoder}}.
> {code}
> NullableCoder<T> of(Coder<T> coder) {
>   if (coder instanceof NullableCoder) return coder;
> }
> {code}



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

Mime
View raw message