Skip to content

Commit 01bc1bd

Browse files
GH-48176: [C++][Parquet] Fix arrow-ipc-message-internal-test failure (#48166)
**Rationale for this change** Fix `arrow-ipc-message-internal-test` on big endian systems by passing endianness explicitly. **Are these changes tested?** Yes. The changes are tested on s390x arch to make sure things are working fine. The fix is also tested on x86 arch, to make sure there is no new regression introduced. **Are there any user-facing changes?** No * GitHub main Issue link: #48151 * GitHub Issue: #48176 Lead-authored-by: Vishwanatha-HD <[email protected]> Co-authored-by: Antoine Pitrou <[email protected]> Signed-off-by: Antoine Pitrou <[email protected]>
1 parent af4f895 commit 01bc1bd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cpp/src/arrow/ipc/message_internal_test.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ TEST(TestMessageInternal, TestByteIdentical) {
4747
std::vector<std::shared_ptr<Field>> fields = {f0, f1};
4848
std::shared_ptr<KeyValueMetadata> metadata =
4949
KeyValueMetadata::Make({"key_1", "key_2"}, {"key_1_value", "key_2_value"});
50-
auto schema = ::arrow::schema({f0}, metadata);
50+
auto schema = ::arrow::schema({f0}, Endianness::Little, metadata);
5151

5252
// Serialize the Schema to a Buffer
5353
std::shared_ptr<Buffer> out_buffer;
@@ -73,6 +73,7 @@ TEST(TestMessageInternal, TestByteIdentical) {
7373
0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x66, 0x30, 0x00, 0x00, 0x08, 0x00,
7474
0x0C, 0x00, 0x08, 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
7575
0x40, 0x00, 0x00, 0x00};
76+
7677
Buffer expected_buffer(expected, sizeof(expected));
7778

7879
AssertBufferEqual(expected_buffer, *out_buffer);

0 commit comments

Comments
 (0)