Skip to content

[58_maintenance] fix: account for offsets in runarrays when using extend for MutableArrayData - #11761

Merged
alamb merged 2 commits into
apache:58_maintenancefrom
Jefffrey:backport_11546_58
Oct 22, 2026
Merged

alamb merged 2 commits into
apache:58_maintenancefrom
Jefffrey:backport_11546_58

Conversation

@Jefffrey

Copy link
Copy Markdown
Contributor

…rayData (apache#11546)

<!--
It is not necessary to raise an issue, but it is encouraged if it is a
non-trivial
enhancement/bug.

If this PR relates to an existing issue, but does not fully resolve it,
please change
the wording below from "Closes #NNN" to "Relates to #NNN" or "Part of
false closing an issue.
-->

None

<!--
Why are you proposing this change? If this is already explained clearly
in the
issue then this section is not needed. Explaining clearly why changes
are proposed
helps reviewers understand your changes and offer better suggestions for
fixes.

Please try to explain the problem you are trying to solve in terms of
the user-visible
behavior, rather than the implementation.
-->

Correctness edge case when using RunArrays in MutableArrayData

<!--
There is no need to duplicate the description in the issue here but it
is
sometimes worth providing a summary of the individual changes in this
PR.
-->

- Account for `ArrayData` offset of RunArrays when extending
`MutableArrayData`
- Checked conversion of usize length to Run index type to avoid wrapping

<!--
We typically require tests for all PRs in order to:
1. Prevent the code from being accidentally broken by subsequent changes
2. Serve as another way to document the expected behavior of the code

If tests are not included in your PR, please explain why (for example,
are they
covered by existing tests, if so identify these tests)?

If this PR claims a performance improvement, please include evidence
such as
benchmark results.

DO NOT simply paste a list of commands ran to verify the code; this is
what our
CI is for and it pollutes the PR. ONLY explain if testing was included
with this
PR, or why it wasn't.
-->

Yes

<!--
Significant user-facing changes include:
- Breaking public API change
- Significant change to existing functionality (e.g. function returns
something different)

These need to be explicitly called out to ensure we have proper
documentation if
required and to ensure we follow proper semantic versioning.

DO NOT restate the changes of this PR; if a bug was fixed and already
explained
above, we don't need this to be restated as a user-facing change.
-->

No
@Jefffrey Jefffrey added the bug label Oct 21, 2026
@github-actions github-actions Bot added the arrow-core Core crates related to representing arrow data label Oct 21, 2026
@Jefffrey

Copy link
Copy Markdown
Contributor Author

@Jefffrey
Jefffrey marked this pull request as ready for review October 22, 2026 07:02
@alamb
alamb merged commit 6078213 into apache:58_maintenance Oct 22, 2026
27 checks passed
@Jefffrey
Jefffrey deleted the backport_11546_58 branch October 22, 2026 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arrow-core Core crates related to representing arrow data bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants