You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ko...@apache.org on 2022/07/19 01:46:09 UTC
[arrow] branch master updated: ARROW-17112: [Java] Fix a failure of TestArrowReaderWriter.testFileFooterSizeOverflow on s390x (#13638)
This is an automated email from the ASF dual-hosted git repository.
kou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push:
new 8fd306724d ARROW-17112: [Java] Fix a failure of TestArrowReaderWriter.testFileFooterSizeOverflow on s390x (#13638)
8fd306724d is described below
commit 8fd306724d99f759fada0c2220d099d186fe7080
Author: Kazuaki Ishizaki <is...@jp.ibm.com>
AuthorDate: Tue Jul 19 01:46:01 2022 +0000
ARROW-17112: [Java] Fix a failure of TestArrowReaderWriter.testFileFooterSizeOverflow on s390x (#13638)
`TestArrowReaderWriter.testFileFooterSizeOverflow` in arrow-vectors always causes a failure on s390x. This is because the test code stores footer length in platform native-endian buffer while footer length is stored as little-endian in a footer.
This PR fixes only the test code.
Authored-by: Kazuaki Ishizaki <is...@jp.ibm.com>
Signed-off-by: Sutou Kouhei <ko...@clear-code.com>
---
.../test/java/org/apache/arrow/vector/ipc/TestArrowReaderWriter.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/java/vector/src/test/java/org/apache/arrow/vector/ipc/TestArrowReaderWriter.java b/java/vector/src/test/java/org/apache/arrow/vector/ipc/TestArrowReaderWriter.java
index 55cab72d29..08c4d34732 100644
--- a/java/vector/src/test/java/org/apache/arrow/vector/ipc/TestArrowReaderWriter.java
+++ b/java/vector/src/test/java/org/apache/arrow/vector/ipc/TestArrowReaderWriter.java
@@ -897,7 +897,7 @@ public class TestArrowReaderWriter {
System.arraycopy(magicBytes, 0, data, 0, ArrowMagic.MAGIC_LENGTH);
int footerLength = Integer.MAX_VALUE;
byte[] footerLengthBytes =
- ByteBuffer.allocate(4).order(ByteOrder.nativeOrder()).putInt(footerLength).array();
+ ByteBuffer.allocate(4).order(ByteOrder.LITTLE_ENDIAN).putInt(footerLength).array();
int footerOffset = data.length - ArrowMagic.MAGIC_LENGTH - 4;
System.arraycopy(footerLengthBytes, 0, data, footerOffset, 4);
System.arraycopy(magicBytes, 0, data, footerOffset + 4, ArrowMagic.MAGIC_LENGTH);