WillAyd commented on PR #596: URL: https://github.com/apache/arrow-nanoarrow/pull/596#issuecomment-2332359507
Ah OK interesting. Do you know if this is confirmed to be working upstream in Arrow? The reason I ask is that when running the test suite for what's already in this PR, when I hit the C++ Export method: https://github.com/apache/arrow/blob/c2123b8b90ab952f854912459bb33ebaf0d99611/cpp/src/arrow/c/bridge.cc#L661 The `n_buffers` being assigned is just 3. I was (likely mistakenly) expecting that to be 4 to account for the validity buffer, inline/prefix buffer, out of line buffer, and a buffer that holds the sizes to all out of line buffers The Arrow docs also read a little vague to me: > int64_t ArrowArray.n_buffers > > Mandatory. The number of physical buffers backing this array. The number of buffers is a function of the data type, as described in the [Columnar format specification](https://arrow.apache.org/docs/format/Columnar.html#format-columnar), except for the the binary or utf-8 view type, which has one additional buffer compared to the Columnar format specification (see [Binary view arrays](https://arrow.apache.org/docs/format/CDataInterface.html#c-data-interface-binary-view-arrays)). > > Buffers of children arrays are not included. I'm not sure if that is saying that the `n_buffers` argument should be 4 for the view types, or that it should be 3 and the consumer is expected to know that when working with view types, you actually have `n_buffers + 1` buffers attached to the `ArrowArray` -- 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]
