jarohen opened a new issue, #40796:
URL: https://github.com/apache/arrow/issues/40796

   ### Describe the enhancement requested
   
   In `ListVector`, `setNull` doesn't update lastSet. This means that, if you 
set many null values in a row, the offset buffer is unnecessarily re-set for 
the intervening values - e.g.:
   
   * If I `.setNull(3)` with `lastSet == 2`, I set offset 3
   * If I then `.setNull(4)`, `.setNull(5)`, `.setNull(6)`, these set 3->4, 
3->5, and 3->6 respectively.
   * With large and sparse enough vectors, this adds significant time to our 
internal benchmarks.
   
   Naively, I'd put `lastSet = index` in `setNull` in the same way as 
`startNewValue`, but aware there might be an implicit/nuanced reason for not 
doing so?
   
   Cheers,
   
   James
   
   ### Component(s)
   
   Java


-- 
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