[
https://issues.apache.org/jira/browse/ARROW-1476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16251988#comment-16251988
]
ASF GitHub Bot commented on ARROW-1476:
---------------------------------------
siddharthteotia commented on a change in pull request #1316: ARROW-1476: [JAVA]
Implement Final ValueVector Updates
URL: https://github.com/apache/arrow/pull/1316#discussion_r150931797
##########
File path:
java/vector/src/main/java/org/apache/arrow/vector/complex/ListVector.java
##########
@@ -491,8 +512,22 @@ public int getNullCount() {
return BitVectorHelper.getNullCount(validityBuffer, valueCount);
}
+ @Override
+ public int getValueCapacity() {
+ return Math.min(getValidityBufferValueCapacity(),
super.getValueCapacity());
+ }
+
+ public int getValidityAndOffsetValueCapacity() {
Review comment:
validity and offset move together regardless of the buffers in underlying
data vector of list vector so functions like setNotNull(), startNewValue(),
setValueCount() which are essentially safe methods need to determine if the
inner buffers of list vector need to be reallocated or not. This decision can't
be made based on getValueCapacity() since that also accounts for the value
capacity of data vector. I think by mistake it is public. that needs to be
corrected.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> [JAVA] Implement final ValueVector updates
> ------------------------------------------
>
> Key: ARROW-1476
> URL: https://issues.apache.org/jira/browse/ARROW-1476
> Project: Apache Arrow
> Issue Type: Sub-task
> Reporter: Jacques Nadeau
> Assignee: Siddharth Teotia
> Labels: pull-request-available
>
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)