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

Luke Cwik commented on BEAM-469:
--------------------------------

When your in the outer context you can inspect the stream by reading ahead 
since you own the remainder of the stream. Thus if there are bytes you know 
that a value is present without requiring the single byte which indicates 
whether there is a value or not. It turns out the negative is not true since if 
there are no bytes you can't tell if there is a value or not since some values 
like the GlobalWindow encode to 0 bytes.

> NullableCoder should encode using the context given and not always use the 
> nested context
> -----------------------------------------------------------------------------------------
>
>                 Key: BEAM-469
>                 URL: https://issues.apache.org/jira/browse/BEAM-469
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-java-core
>            Reporter: Luke Cwik
>            Priority: Trivial
>
> NullableCoder should encode using the context given and not always use the 
> nested context. For coders which can efficiently encode in the outer context 
> such as StringUtf8Coder or ByteArrayCoder, we are forcing them to prefix 
> themselves with their length.



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

Reply via email to