Re: [DISCUSS] readerIndex/writerIndex in Java vector refactor

2017-11-09 Thread Li Jin
Gotcha. Thanks for the clarification. On Thu, Nov 9, 2017 at 2:27 PM, Jacques Nadeau wrote: > Yes, we should only set reader/writer index on getBuffers() > > On Thu, Nov 9, 2017 at 11:13 AM, Li Jin wrote: > > > I see. Is this understanding correct? > > > > For ArrowBufs in vector classes, their

Re: [DISCUSS] readerIndex/writerIndex in Java vector refactor

2017-11-09 Thread Jacques Nadeau
Yes, we should only set reader/writer index on getBuffers() On Thu, Nov 9, 2017 at 11:13 AM, Li Jin wrote: > I see. Is this understanding correct? > > For ArrowBufs in vector classes, their reader/writerIndex are 0. Only when > writing out a record batch, the writerIndex in ArrowBufs is then set

Re: [DISCUSS] readerIndex/writerIndex in Java vector refactor

2017-11-09 Thread Li Jin
I see. Is this understanding correct? For ArrowBufs in vector classes, their reader/writerIndex are 0. Only when writing out a record batch, the writerIndex in ArrowBufs is then set correctly. On Thu, Nov 9, 2017 at 1:28 PM, Siddharth Teotia wrote: > ReaderIndex and WriterIndex are important

Re: [DISCUSS] readerIndex/writerIndex in Java vector refactor

2017-11-09 Thread Siddharth Teotia
ReaderIndex and WriterIndex are important when we get the buffers (for sending over the wire). We get the buffers from one or more vectors, build a compound buffer and slice it on the other end when reconstructing the vectors. Writer index helps in demarcating the exact end point of last written da

[DISCUSS] readerIndex/writerIndex in Java vector refactor

2017-11-09 Thread Li Jin
Hi All, I am reading Java vector refactor code and come cross readerIndex/writerIndex on ArrowBuf. This issue has been brought up by Siddharth Teotia earlier but I might have missed the discussion so what to clarify. My understanding is that the current implementation in java refactor branch igno