Paul Horn created ARROW-16377:
---------------------------------

             Summary: ListVector#getBuffers returns buffers in the wrong order 
for usage of VectorLoader
                 Key: ARROW-16377
                 URL: https://issues.apache.org/jira/browse/ARROW-16377
             Project: Apache Arrow
          Issue Type: Bug
          Components: Java
            Reporter: Paul Horn


Calling 
[getBuffers|https://github.com/apache/arrow/blob/06ca00c2daeeb0d6461e7b6bec51679c19b5b92b/java/vector/src/main/java/org/apache/arrow/vector/complex/ListVector.java#L652-L653]
 on a ListVector adds the offsetBuffers first and the validityBuffer second. 
When a ListVector is populated by 
[loadFieldBuffers|https://github.com/apache/arrow/blob/06ca00c2daeeb0d6461e7b6bec51679c19b5b92b/java/vector/src/main/java/org/apache/arrow/vector/complex/ListVector.java#L183-L189]
 (e.g. via a VectorLoader), the validityBuffer is read first and the 
offsetBuffer is read second. The resulting vector represents different data 
than the originating vector.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to