You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/06/24 06:17:05 UTC

[GitHub] [arrow] lfygh opened a new issue, #13431: when use setBytes(), ArrowBuf.nioBuffer() is empty,but writeBytes(byte[]) can work.

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

   
   what is the diff ArrowBuf#writeBytes(byte[]) vs ArrowBuf#setBytes(long, byte[]), if i use setBytes(), ArrowBuf.nioBuffer() is empty,but writeBytes(byte[]) can work. this is a bug or i miss sth?


-- 
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: github-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] lfygh closed issue #13431: when use setBytes(), ArrowBuf.nioBuffer() is empty,but writeBytes(byte[]) can work.

Posted by GitBox <gi...@apache.org>.
lfygh closed issue #13431: when use setBytes(), ArrowBuf.nioBuffer() is empty,but writeBytes(byte[]) can work.
URL: https://github.com/apache/arrow/issues/13431


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] lidavidm commented on issue #13431: when use setBytes(), ArrowBuf.nioBuffer() is empty,but writeBytes(byte[]) can work.

Posted by GitBox <gi...@apache.org>.
lidavidm commented on issue #13431:
URL: https://github.com/apache/arrow/issues/13431#issuecomment-1165553813

   setBytes doesn't update writerIndex, but writeBytes does, and the length of the nioBuffer is defined as `writerIndex - readerIndex`. So if you use setBytes, the length of the buffer is still 0. The docstring could be clarified, but this sounds like intentional behavior to me.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org