westonpace opened a new pull request #11542: URL: https://github.com/apache/arrow/pull/11542
This creates a `byte_ranges` vector function which extracts the buffer ranges referenced by an array. It's a bit involved because array offsets are in "# of values" and that does not always translate cleanly into an offset into the underlying buffers. The trickiest case is dense unions where we need to traverse the values buffer to figure out the correct array offset for the child arrays. The one case not handled by this PR is dictionary arrays. A sliced array may only reference a portion of the dictionary but since that referenced portion need not even be contiguous it would be too expensive to figure out. Pruning of duplicate ranges will be handled in ARROW-14357 Once this is in I plan to wrap it with another utility function to sum up the range lengths (the only reason I'm returning ranges is so that I can later prune duplicate ranges). This function will be complementary to (i.e. will not replace) the naive function TotalBufferSize added in #11441 . The two functions will provide two possible ways of measuring the size of an element. -- 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]
