nbauernfeind opened a new issue, #585:
URL: https://github.com/apache/arrow-java/issues/585

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   UnionListWriter's impl:
   ```java
     @Override
     public void startList() {
       vector.startNewValue(idx());
       writer.setPosition(vector.getOffsetBuffer().getInt((idx() + 1L) * 
OFFSET_WIDTH));
       listStarted = true;
     }
   ```
   
   
   Whereas UnionLargeListViewWriter:
   ```java
     @Override
     public void startList() {
       vector.startNewValue(idx());
       writer.setPosition(vector.getOffsetBuffer().getInt((idx()) * 
OFFSET_WIDTH));
       listStarted = true;
     }
   ```
   
   Note that the issue is that `UnionListWriter` fetches the offset of `idx() + 
1` -- not the offset of `idx()` like the Large impl.
   
   Also note that `startNewValue` returns the position that the writer can be 
set to; we don't need to poke into the offset buffer. 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to