Skip to content

[59_maintenance] fix(arrow-data): check view nulls at the right index in ArrayData equality - #11675

Merged
alamb merged 1 commit into
apache:59_maintenancefrom
Jefffrey:backport_11642
Oct 19, 2026
Merged

alamb merged 1 commit into
apache:59_maintenancefrom
Jefffrey:backport_11642

Conversation

@Jefffrey

Copy link
Copy Markdown
Contributor

…quality (apache#11642)

- Closes apache#11583.

When a list, list view, fixed-size list or struct compares a `Utf8View`
/ `BinaryView` child range that doesn't start at 0, `byte_view_equal`
read the null bit of the wrong child slot. Arrays that only differ in
the data under a null compared unequal, and a real difference in a valid
slot could be skipped and compare equal.

`byte_view_equal` now checks `lhs.is_null(lhs_start + idx)` instead of
`lhs.is_null(idx)`, since `idx` counts from the start of the compared
range. The views it compares were already offset by `lhs_start`, so this
only lines the null check up with them.

Yes. `test_list_of_view_child_nulls_past_start` in
`arrow/tests/array_equal.rs` builds a two-row list over a `Utf8View` and
a `BinaryView` child and compares the second row sliced off, covering
both directions: two `[[null]]` values with different hidden data (now
equal) and two valid rows with different values next to a null at child
index 0 (now unequal). It fails without the fix.

No.

AI disclosure: I used an AI coding assistant to write the fix, the test
and this description, and I reviewed all of it.

Co-authored-by: ump45nose <[email protected]>
@Jefffrey Jefffrey added the bug Squash those bugs label Oct 18, 2026
@github-actions github-actions Bot added the arrow-core Core crates related to representing arrow data label Oct 18, 2026
@Jefffrey
Jefffrey marked this pull request as ready for review October 18, 2026 13:11

@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.

Verified this is a clean backport. Thank you @Jefffrey

@alamb
alamb merged commit b169e68 into apache:59_maintenance Oct 19, 2026
31 checks passed
@Jefffrey
Jefffrey deleted the backport_11642 branch October 21, 2026 10:55
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