kita-renji opened a new pull request, #11224: URL: https://github.com/apache/arrow-rs/pull/11224
## Which issue does this PR close? - Closes #11011. ## Rationale for this change `decode_binary_view_inner` casts the data buffer offset to `u32` with no bound, so once the non-inlined values in a batch go over 4 GiB the views silently point at the wrong bytes. The issue left open whether to split the buffer or fail. This PR fails, since it is the smaller change and keeps the hot loop as is. Splitting into multiple buffers can come later if people hit this in practice, and the signatures would not need to change again. ## What changes are included in this PR? - `decode_binary_view` and `decode_string_view` now return `Result`; `decode_column` already returns `Result`, so this is internal only. - New `check_view_buffer_len` helper, called once after the capacity pass on the summed length of non-inlined values, returns `InvalidArgumentError` above `u32::MAX`. - The per-row cast keeps `as u32` with a `debug_assert!`, same approach as `concat_elements_view_array`. ## Are these changes tested? Yes, a unit test on the helper with synthetic lengths (`u32::MAX` passes, `u32::MAX + 1` and `usize::MAX` fail), since actually decoding more than 4 GiB is too much for a test. Existing arrow-row tests pass. I ran the `row_format` string view `convert_rows` benches before and after, but my machine was shared and an A/A run swung by up to 2x, so I can't claim anything from the numbers beyond no obvious regression. The release-mode per-row loop is unchanged. The only added work is one compare per column. ## Are there any user-facing changes? `RowConverter::convert_rows` now returns an error for this case instead of returning wrong data. No public API changes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
