paleolimbot commented on code in PR #808:
URL: https://github.com/apache/arrow-nanoarrow/pull/808#discussion_r2370791394
##########
src/nanoarrow/common/inline_array.h:
##########
@@ -43,8 +43,17 @@ static inline struct ArrowBuffer* ArrowArrayBuffer(struct
ArrowArray* array, int
switch (i) {
case 0:
return &private_data->bitmap.buffer;
+ case 1:
+ return private_data->buffers;
default:
- return private_data->buffers + i - 1;
+ if (array->n_buffers > 3 && i == (array->n_buffers - 1)) {
Review Comment:
I'm going for "the last buffer of an array with variadic buffers"...I
*think* if I didn't have the first condition it would pick up any last buffer
(in any case it should be clearer what it's trying to do!)
--
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]