You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Rok Mihevc (Jira)" <ji...@apache.org> on 2023/01/11 07:15:03 UTC

[jira] [Updated] (ARROW-1467) [JAVA]: Fix reset() and allocateNew() in Nullable Value Vectors template

     [ https://issues.apache.org/jira/browse/ARROW-1467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rok Mihevc updated ARROW-1467:
------------------------------
    External issue URL: https://github.com/apache/arrow/issues/17487

> [JAVA]: Fix reset() and allocateNew() in Nullable Value Vectors template
> ------------------------------------------------------------------------
>
>                 Key: ARROW-1467
>                 URL: https://issues.apache.org/jira/browse/ARROW-1467
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Java
>            Reporter: Siddharth Teotia
>            Assignee: Siddharth Teotia
>            Priority: Major
>             Fix For: 0.7.0
>
>
> (1) 
> allocateNew() in NullableValueVectors allocates extra memory for the validity vector of fixed-width vectors. Instead of doing bits.allocateNew(valueCount + 1), we should simply do bits.allocateNew(valueCount). 
> AFAIK, the only case where we need an additional valueCount is for the offsetVector and we already do that. Additional valueCount for the validity vector is not needed.
> (2)
> reset() method should call reset() on the underlying value vector as well to re-initialize the state (allocation monitor, reader index etc) and zero out the buffers. Right now we just reset the validity vector.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)