apache / apache/arrow-java

[JAVA] Vector should avoid reallocating validity buffer when necessary

Open
#370 0 comments 0 reactions 0 assignees View on GitHub
Type: enhancement
Dominant language
Java
Stars
94
Forks
152
Avg merge
3d 16h
Merged PRs (30d)
11

Description

Vector always reallocates validity buffer in the case of all-null or non-null

Ideally we should only allocate if the source was not provided

**Reporter**: [Zhenyuan Zhao](https://issues.apache.org/jira/browse/ARROW-3222) / @zzhao0

**Note**: *This issue was originally created as [ARROW-3222](https://issues.apache.org/jira/browse/ARROW-3222). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*

Contributor guide

Open the contributing guide

Research direction

Start with the allocation paths at BaseFixedWidthVector.java#L511 and BitVectorHelper.java#L180, then trace how validity buffers are handled for all-null and non-null vectors. The change is complete when allocation occurs only when the source was not provided, while avoiding unnecessary validity-buffer reallocation.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
data, performance
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.