jbonofre opened a new pull request, #1479:
URL: https://github.com/apache/arrow-java/pull/1479

   ## What's Changed
   
   Follow-up to #1231. A NULL row in `ClobConsumer` doesn't write its end 
offset, so the next value read its start offset from that unwritten slot (`0`) 
and was written over the earlier values: rows `"AAAA", NULL, "BB"` read back as 
`"BBAA", NULL, "BB"`, with decreasing offsets.
   
   Both consumers now call `vector.fillEmpties(currentIndex)` before writing a 
value, as `setSafe()` does. It gives the NULL rows since the last value empty 
offsets, and also grows the validity and offset buffers when `currentIndex` is 
past the value capacity, as `BinaryConsumer` does. Before, consuming more rows 
than the value capacity (3970 by default) failed with an 
`IndexOutOfBoundsException`.
   
   `ClobConsumerTest` covers NULL rows before, between and after values for 
both consumers, and twice the default value capacity of rows. The three new 
tests fail without the fix.
   
   Closes #1477.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to