veeceey opened a new pull request, #49373: URL: https://github.com/apache/arrow/pull/49373
`ReferencedBufferSize` (used by pyarrow's `Table.nbytes` / `Array.nbytes`) was missing a visitor for `BinaryViewType`, which caused: ``` ArrowTypeError: Extracting byte ranges not supported for type string_view ``` when calling `.nbytes` on any table/array containing `string_view` or `binary_view` columns. The fix adds a `Visit(const BinaryViewType&)` handler to `GetByteRangesArray` that accounts for: 1. The validity bitmap (buffer 0) 2. The views buffer (buffer 1) - fixed-width, 16 bytes per element 3. Out-of-line data buffers (buffers 2+) - only the ranges actually referenced by non-inline views Since `StringViewType` inherits from `BinaryViewType`, both types are handled. Also added tests for inline-only, mixed, and out-of-line binary_view/string_view arrays. Fixes #47279 -- 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]
