You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/06/25 13:14:00 UTC

[jira] [Updated] (ARROW-9221) ArrowBuf#setBytes(int, ByteBuffer) doesn't check the byte buffer's endianness

     [ https://issues.apache.org/jira/browse/ARROW-9221?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ASF GitHub Bot updated ARROW-9221:
----------------------------------
    Labels: pull-request-available  (was: )

> ArrowBuf#setBytes(int, ByteBuffer) doesn't check the byte buffer's endianness
> -----------------------------------------------------------------------------
>
>                 Key: ARROW-9221
>                 URL: https://issues.apache.org/jira/browse/ARROW-9221
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Java
>    Affects Versions: 0.15.1
>            Reporter: David Li
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> [https://github.com/apache/arrow/blob/c9c5f5f2e8e8f5db4141d06b6e1841f0a55d905a/java/memory/src/main/java/org/apache/arrow/memory/ArrowBuf.java#L832]
> This should check/set the buffer's endianness. This came up while debugging an issue in Flight; PutResult#fromProtocol asks Protobuf for the byte buffers that underlie a ByteString, but if the implementation is LiteralByteString, Protobuf has no buffers. So it wraps the underlying byte[], and of course the default endianness is BIG_ENDIAN.
> [https://github.com/apache/arrow/blob/c9c5f5f2e8e8f5db4141d06b6e1841f0a55d905a/java/flight/flight-core/src/main/java/org/apache/arrow/flight/PutResult.java#L81]
> [https://github.com/protocolbuffers/protobuf/blob/2b7b7f7f72e3617191972fbafb298cf7ec31e95e/java/core/src/main/java/com/google/protobuf/ByteString.java#L1371]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)