[JAVA] Vector should avoid reallocating validity buffer when necessary
- 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
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