[
https://issues.apache.org/jira/browse/ARROW-485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17657519#comment-17657519
]
Rok Mihevc commented on ARROW-485:
----------------------------------
This issue has been migrated to [issue
#16128|https://github.com/apache/arrow/issues/16128] on GitHub. Please see the
[migration documentation|https://github.com/apache/arrow/issues/14542] for
further details.
> [Java] Users are required to initialize VariableLengthVectors.offsetVector
> before calling VariableLengthVectors.mutator.getSafe
> --------------------------------------------------------------------------------------------------------------------------------
>
> Key: ARROW-485
> URL: https://issues.apache.org/jira/browse/ARROW-485
> Project: Apache Arrow
> Issue Type: Improvement
> Components: Java
> Reporter: Li Jin
> Priority: Minor
> Fix For: 0.2.0
>
>
> https://github.com/apache/arrow/blob/master/java/vector/src/main/codegen/templates/VariableLengthVectors.java#L492
> Here VariableLengthVectors.getMutator().setSafe() calls:
> {code}
> offsetVector.getAccessor().get(index)
> {code}
> however, index 0 of offsetVector (which is always 0) is not initialized by
> VariableLengthVectors.
> As a result, user of the VariableLengthVectors needs to manually initialize
> the class by calling:
> {code}
> VariableLengthVectors.getOffsetVector().getMutator().setSafe(0, 0)
> {code}
> I wonder if this is necessary or should VariableLengthVectors initialize this
> for the user
--
This message was sent by Atlassian Jira
(v8.20.10#820010)