lwhite1 commented on issue #13721:
URL: https://github.com/apache/arrow/issues/13721#issuecomment-1222418388
Ax far as I know, there is no documentation other than what is in the source
code. A holder is just a clever way to access values in a Vector generically
without boxing every primitive value, and only creating one holder per
ValueVector.
So for example, If you have an IntVector called ageVector, and you want to
add a year to everyone's age, you would create your IntHolder(s) once before
starting your loop, then set its value inside the loop and pass the holder to a
writer.
```
IntVector ageVector = ...
IntHolder ageWriteHolder = new IntHolder();
IntHolder ageReadHolder = new IntHolder();
for (int i = 0; i < ageVector.getRowCount(); i++);
intVector.get(i, ageReadHolder);
ageWriteHolder.value = ageReadHolder.value + 1;
intVector.set(i, ageWriteHolder);
}
```
--
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]