ump45nose opened a new pull request, #11662: URL: https://github.com/apache/arrow-rs/pull/11662
# Which issue does this PR close? - Closes #11587. # Rationale for this change `ArrayData` validation accepted run-end encoded data whose `offset + len` was past its last run end, so reading those rows indexed past the end of the values. `check_run_ends` already has the right check, but it runs on the run ends child, so it compared the last run end with the child's length (the number of runs), which can never fail. # What changes are included in this PR? `check_run_ends` now takes the run-end encoded array's `len` and `offset` and checks the last run end against those. # Are these changes tested? Yes. `test_validate_run_ends_cover_logical_offset_and_len` in `arrow-data/src/data.rs` builds run ends `[2, 3]` with a few offset/length combinations: ones that fit build fine, and `len` 5, or offset 2 with `len` 2, now return the "offset + length" error. It fails without the fix. # Are there any significant user-facing changes? `ArrayData` validation now rejects run-end encoded data whose rows run past the last run end. That data was already invalid. 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]
