Skip to content

fix: account for arraydata offset when comparing runarrays - #11536

Merged
Jefffrey merged 2 commits into
apache:mainfrom
Jefffrey:run-array-equality-fix
Oct 14, 2026
Merged

Jefffrey merged 2 commits into
apache:mainfrom
Jefffrey:run-array-equality-fix

Conversation

@Jefffrey

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

  • None

Rationale for this change

Equality fix for ArrayData

What changes are included in this PR?

If RunArray has physical offset for its runs child, we should account for this properly.

Are these changes tested?

Yes

Are there any significant user-facing changes?

No

run_ends_data.offset(),
run_ends_data.len(),
),
data.offset() + start,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

run_ends_data.offset() = physical offset into runs child, which is an array

data.offset() = logical offset into run array itself

we cant add them together, as they offset different things

@Jefffrey
Jefffrey marked this pull request as ready for review October 13, 2026 09:50
@Jefffrey Jefffrey added the bug Squash those bugs label Oct 13, 2026
@github-actions github-actions Bot added the arrow-core Core crates related to representing arrow data label Oct 13, 2026

@alamb alamb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you @Jefffrey -- this makes sense to me

The title of this PR is a little confusing as it says "comparing run arrrays" when I think the issue is fixing when constructing run arrays

@Rich-T-kid Rich-T-kid left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nice straightforward fix, thanks @Jefffrey

@Jefffrey

Copy link
Copy Markdown
Contributor Author

Thank you @Jefffrey -- this makes sense to me

The title of this PR is a little confusing as it says "comparing run arrrays" when I think the issue is fixing when constructing run arrays

yep, but this construction happens internally in the equals logic

@Jefffrey

Copy link
Copy Markdown
Contributor Author

thanks @alamb & @Rich-T-kid

Merged via the queue into apache:main with commit bfdcd26 Oct 14, 2026
34 checks passed
@Jefffrey
Jefffrey deleted the run-array-equality-fix branch October 14, 2026 10:35
alamb added a commit that referenced this pull request Oct 20, 2026
…arrays (#11673)

- Backport #11536
- For inclusion in #11664

Cherry-pick of
bfdcd26

---------

Co-authored-by: Andrew Lamb <[email protected]>
alamb pushed a commit that referenced this pull request Oct 21, 2026
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 Squash those bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants