Skip to content

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

Merged
Jefffrey merged 3 commits into
apache:58_maintenancefrom
Jefffrey:backport_11642_58
Oct 22, 2026
Merged

Jefffrey merged 3 commits into
apache:58_maintenancefrom
Jefffrey:backport_11642_58

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 21, 2026
@github-actions github-actions Bot added the arrow-core Core crates related to representing arrow data label Oct 21, 2026
@Jefffrey
Jefffrey marked this pull request as ready for review October 21, 2026 12:09
@alamb

alamb commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Merging as MSRV failure is unrelated. I will fix in this PR

@Jefffrey
Jefffrey merged commit d97b068 into apache:58_maintenance Oct 22, 2026
27 checks passed
@Jefffrey
Jefffrey deleted the backport_11642_58 branch October 22, 2026 07:01
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.

4 participants