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

Daniel Halperin commented on BEAM-469:
--------------------------------------

I think there is a meta-point here. Suppose I have a coder C that uses 1 or 
more inner coders D, E, F, G, ...

{{C}} has a Coder context {{c}}, and a nested context {{n}}.
If there are {{N}} inner coders, only the first {{N-1}} inner coders need use 
the nested context {{n}}. The last coder can use the context {{c}} instead. 
This can be a mild or large savings if {{c}} is the outer context.

The {{NullableCoder}} bug here is just the denegerate case of {{N}} == 1.

> 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
>            Assignee: Luke Cwik
>            Priority: Trivial
>             Fix For: Not applicable
>
>
> 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