You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Kenneth Knowles (Jira)" <ji...@apache.org> on 2022/01/12 03:50:03 UTC
[jira] [Updated] (BEAM-12754) RowCoderGenerator calls getValue multiple times
[ https://issues.apache.org/jira/browse/BEAM-12754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kenneth Knowles updated BEAM-12754:
-----------------------------------
This Jira ticket has a pull request attached to it, but is still open. Did the pull request resolve the issue? If so, could you please mark it resolved? This will help the project have a clear view of its open issues.
> RowCoderGenerator calls getValue multiple times
> -----------------------------------------------
>
> Key: BEAM-12754
> URL: https://issues.apache.org/jira/browse/BEAM-12754
> Project: Beam
> Issue Type: Improvement
> Components: sdk-java-core
> Affects Versions: 2.31.0
> Reporter: Steve Niemitz
> Priority: P2
> Time Spent: 3h
> Remaining Estimate: 0h
>
> RowCoderGenerator.encodeDelegate calls getValue for each field on a row twice, one to check if it is null in scanNullFields, and one to actually get the value to be encoded.
> If getValue is expensive (for example, it has to recursively adapt a type to a beam Row), this causes unneeded extra work.
> Instead we could call value.getValues to get all values once, then pass them to scanNullFields and re-use them when encoding the values.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)