Re: Best way to create/set validity bitmap buffer in Java

2017-01-12 Thread Julien Le Dem
Hi Li, The missing piece is that you are supposed to call setValueCount() on the mutator when you are done writing to it. that would be 2.5 in your original email. Julien On Wed, Jan 4, 2017 at 8:52 AM, Wes McKinney wrote: > You can use the approach in the test suite: > > https://github.com/apa

Re: Best way to create/set validity bitmap buffer in Java

2017-01-04 Thread Wes McKinney
You can use the approach in the test suite: https://github.com/apache/arrow/blob/a2ead2f646baad78de01fcb1b90f710fa1eae70b/java/vector/src/test/java/org/apache/arrow/vector/TestValueVector.java#L289 If the Java folks have some other recommendations, I'll let them chime in. - Wes On Tue, Jan 3, 2

Re: Best way to create/set validity bitmap buffer in Java

2017-01-03 Thread Li Jin
To answer myself: the above doesn't work because mutator doesn't update writerIndex (only ArrowBuf.writeXXX does). Still wondering if there is a good way of setting validity map in Java? Li On Tue, Jan 3, 2017 at 5:11 PM, Li Jin wrote: > Hi, > > I am working on a function where I want to creat