Skip to content

[C++] IPC schema endianness doesn't roundtrip #48238

Closed

Description

@pitrou

Describe the bug, including details regarding any error messages, version, and platform.

It seems that, when writing an IPC schema, we always write out the host's endianness regardless of what the Schema object says, while the read side does populate the Schema's endianness.

Contrast the read side that reads endianness from Flatbuffers and stores it on the Schema object:

// set endianness using the value in flatbuf schema
auto endianness = schema->endianness() == flatbuf::Endianness::Endianness_Little
? Endianness::Little
: Endianness::Big;
*out = ::arrow::schema(std::move(fields), endianness, metadata);

with the write side that ignores the Schema's endianness and itself writes out the host's endianness:

auto fb_offsets = fbb.CreateVector(field_offsets);
*out = flatbuf::CreateSchema(fbb, endianness(), fb_offsets,
SerializeCustomMetadata(fbb, schema.metadata()));

Component(s)

C++

Activity

  1. pitrou commented on Nov 24, 2025

    @pitrou
    MemberAuthor

    I've discovered this while reading through #48166 and experimenting with additional test code.

    @Vishwanatha-HD @kiszk

  2. self-assigned this
    on Nov 24, 2025
  3. added 2 commits that reference this issue on Nov 24, 2025
  4. added this to the 23.0.0 milestone on Nov 29, 2025
  5. pitrou commented on Nov 29, 2025

    @pitrou
    MemberAuthor

    Issue resolved by pull request 48239
    #48239

  6. added
    Critical Fix
    on Nov 30, 2025
  7. added a commit that references this issue on May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Component: C++Critical FixType: bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions