[
https://issues.apache.org/jira/browse/ARROW-4635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16772836#comment-16772836
]
Pindikura Ravindra commented on ARROW-4635:
-------------------------------------------
I think this is a side affect of my changes for ARROW-4147. In allocateNewSafe()
* Prior to my change, the FixedWidthVectors were allocating buffers equal to
the last known size.
* Post my change, the FixedWidthVectors are allocating buffers equal to the
initial size (INITIAL_VALUE_ALLOCATION).
So, in a sequence of
# allocateNewSafe()
# reAlloc()
# reAlloc()
# allocateNewSafe()
Prior to my change, the 4th step would do an allocation of 4 *
INITIAL_VALUE_ALLOCATION. Post my change, the 4th step does an allocation of
INITIAL_VALUE_ALLOCATION.
This behavior is happening in the child vectors (i.e primitive vectors) but the
complex vectors still have the old behavior, This mismatch is causing the bug.
> StructVector growing validity buffer unnecessaily
> -------------------------------------------------
>
> Key: ARROW-4635
> URL: https://issues.apache.org/jira/browse/ARROW-4635
> Project: Apache Arrow
> Issue Type: Bug
> Components: Java
> Reporter: Thippana Vamsi Kalyan
> Assignee: Pindikura Ravindra
> Priority: Major
> Labels: patch, pull-request-available
> Time Spent: 20m
> Remaining Estimate: 0h
>
> reAlloc method inside StructVector.java is growing validity buffer and
> growing capacity of children.
> When validity buffer already has enough capacity to accommodate new size of
> children, growing validity buffer can be avoided.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)