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

ASF GitHub Bot updated ARROW-6200:
----------------------------------
    Labels: pull-request-available  (was: )

> [Java] Method getBufferSizeFor in BaseRepeatedValueVector/ListVector not 
> correct
> --------------------------------------------------------------------------------
>
>                 Key: ARROW-6200
>                 URL: https://issues.apache.org/jira/browse/ARROW-6200
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Java
>            Reporter: Ji Liu
>            Assignee: Ji Liu
>            Priority: Critical
>              Labels: pull-request-available
>
> Currently, {{getBufferSizeFor}} in {{BaseRepeatedValueVector}} implemented as 
> below:
> {code:java}
> if (valueCount == 0) {
>   return 0;
> }
> return ((valueCount + 1) * OFFSET_WIDTH) + 
> vector.getBufferSizeFor(valueCount);
> {code}
> Here vector.getBufferSizeFor(valueCount) seems not right which should be
>  
> {code:java}
> int innerVectorValueCount = offsetBuffer.getInt(valueCount * OFFSET_WIDTH);
> vector.getBufferSizeFor(innerVectorValueCount)
> {code}
>  ListVector has the same problem.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to