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 2020/07/01 12:08:42 UTC

[GitHub] [arrow] lidavidm commented on pull request #7543: ARROW-9221: [Java] account for big-endian buffers in ArrowBuf.setBytes

lidavidm commented on pull request #7543:
URL: https://github.com/apache/arrow/pull/7543#issuecomment-652379935


   @liyafan82 The problem actually isn't with big-endian platforms! It's because Java's ByteBuffer [defaults to big-endian](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/ByteBuffer.html#wrap(byte%5B%5D)), and some libraries, like Protobuf, inherit that behavior. We discovered this when developing with Flight internally; there are Protobuf APIs that return a ByteBuffer that may be big-endian; when Flight tries to copy the buffer into an ArrowBuf, it corrupts the data.


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

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