ump45nose opened a new pull request, #11642: URL: https://github.com/apache/arrow-rs/pull/11642
# Which issue does this PR close? - Closes #11583. # Rationale for this change 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. # What changes are included in this PR? `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. # Are these changes tested? 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. # Are there any significant user-facing changes? No. AI disclosure: I used an AI coding assistant to write the fix, the test and this description, and I reviewed all of it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
