Moritz Mack created BEAM-14166:
----------------------------------
Summary: Improvements to RowWithGetter
Key: BEAM-14166
URL: https://issues.apache.org/jira/browse/BEAM-14166
Project: Beam
Issue Type: Improvement
Components: sdk-java-core
Reporter: Moritz Mack
Various improvements to getValue(fieldIdx) in RowWithGetters mentioned
[here|[https://github.com/apache/beam/pull/16947#discussion_r833602836]:]
* Minimize memory overhead of cache using either a index lookup (array) or a
single hash map if number of fields exceeds the initial hashmap capacity
* The cache should be checked before calling a getter to avoid any potentially
unnecessary conversion in the getter itself.
* [Nested
rows|https://github.com/apache/beam/blob/master/sdks/java/core/src/main/java/org/apache/beam/sdk/values/RowWithGetters.java#L111]
should be cached, otherwise the cache of such nested rows can't be leveraged.
* Handling of collections / maps / iterables can be significantly improved by
simply skipping the transform in all cases where {{getValue}} for members is
the [identity
transform|https://github.com/apache/beam/blob/master/sdks/java/core/src/main/java/org/apache/beam/sdk/values/RowWithGetters.java#L142].
--
This message was sent by Atlassian Jira
(v8.20.1#820001)