You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "Daniel Halperin (JIRA)" <ji...@apache.org> on 2016/08/16 16:25:20 UTC
[jira] [Comment Edited] (BEAM-469) NullableCoder should encode
using the context given and not always use the nested context
[ https://issues.apache.org/jira/browse/BEAM-469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15422979#comment-15422979 ]
Daniel Halperin edited comment on BEAM-469 at 8/16/16 4:24 PM:
---------------------------------------------------------------
I think there is a generalization 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.
was (Author: dhalperi@google.com):
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)