Skip to content

fix: Honor useUnalignedBuffers in ArrowReader.readStreaming#179

Merged
kou merged 1 commit into
apache:mainfrom
maltzsama:fix/allowReadingUnalignedBuffers
Jul 24, 2026
Merged

fix: Honor useUnalignedBuffers in ArrowReader.readStreaming#179
kou merged 1 commit into
apache:mainfrom
maltzsama:fix/allowReadingUnalignedBuffers

Conversation

@maltzsama

@maltzsama maltzsama commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

What's Changed

readStreaming declared a useUnalignedBuffers parameter and ignored it,
hardcoding allowReadingUnalignedBuffers: true when constructing the
ByteBuffer. This forwards the caller's value, matching readFile and
fromMessage, which already do so.

Testing

The full test suite passes with this change.

No new test is included: the flag selects between aligned and unaligned
loads inside FlatBuffers and does not affect the result of any read on this
path, because ByteBuffer(data:) copies the input into aligned storage. A
test exercising the parameter would pass both with and without this change,
so it would not guard against a regression.

The streaming reader is already covered by IPCStreamReaderTests and the
streaming cases in IPCFileReaderTests.

Closes #178.

readStreaming declared a useUnalignedBuffers parameter and ignored it,
hardcoding allowReadingUnalignedBuffers: true when constructing the
ByteBuffer. Forward the caller's value instead, matching readFile and
fromMessage, which already do so.

No new test is included: the flag selects between aligned and unaligned
loads inside FlatBuffers and does not change the result of any read on
this path, since ByteBuffer(data:) copies the input into aligned storage.
A test exercising the parameter would pass with and without this change.

Closes apache#177

@kou kou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@kou
kou merged commit 8886eac into apache:main Jul 24, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

readStreaming ignores its useUnalignedBuffers parameter

2 participants