Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[53.0.0_maintenance] fix: Encoding of List offsets was incorrect when slice offsets begin #6943

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Jan 5, 2025

Which issue does this PR close?

Rationale for this change

Backport some specific fixes to the 53 line for a maintenace release

What changes are included in this PR?

Are there any user-facing changes?

…with zero (apache#6805)

* fix: Encoding of List offsets was incorrect when slice offsets begin with zero

When encoding offsets the code had an optimization to reuse the offsets if the first offset was zero assuming the slice already pointed
 to first element. But the offset can also be zero if all previous lists were empty. When this occured it mold make all lists in the
slice as empty, even if they shouldn't be.

* Use Buffer::from_slice_ref which will be faster as it doesn't iterate through the slice.

* Avoid copying

* Explicitly reference std::mem::size_of
@github-actions github-actions bot added the arrow Changes to the arrow crate label Jan 5, 2025
@alamb
Copy link
Contributor Author

alamb commented Jan 8, 2025

Since this is a cherry-pick of a previously approved PR I am going to merge it in and anyone can review if they want as part of the release approval process.

@alamb alamb merged commit 955180b into apache:53.0.0_maintenance Jan 8, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants