You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by GitBox <gi...@apache.org> on 2022/07/26 18:52:51 UTC

[GitHub] [arrow-nanoarrow] paleolimbot opened a new issue, #5: Implement `ArrowArray*` helpers

paleolimbot opened a new issue, #5:
URL: https://github.com/apache/arrow-nanoarrow/issues/5

   Now that we have buffer holders (`struct ArrowBuffer`) we can implement an owning `struct ArrowArray`. I envision the API something like the `ArrowSchema*` helpers:
   
   - `ArrowArrayInit(struct ArrowArray* array, int64_t n_buffers)`
   - `ArrowArrayAllocateChildren(struct ArrowArray* array, int64_t n_children)`
   - `ArrowArraySetBuffer(struct ArrowArray* array, int64_t i, struct ArrowBuffer* buffer)` (moves the `struct ArrowBuffer` so that it lives in memory owned by `array->private_data` and sets `array->buffers[i] = buffer->data`).
   
   @lidavidm commented:
   
   Maybe `Init` could take the type and then it would know how many buffers to allocate? (Ditto for `AllocateChildren`)
   
   @paleolimbot commented:
   
   Ah that makes sense, and parallels `ArrowSchemaInit()` (where the caller can fall back on `NANOARROW_TYPE_UNINITIALIZED` if they're implementing their own logic). I think `ArrowArrayAllocateChildren()` has to exist on its own, but the utility of a helper like `ArrowArrayInitFromSchemaView(struct ArrowArray* array, struct ArrowSchemaView* view, struct ArrowError* error)` might become clear at some point (since the schema view contains all the information needed to initialize all the buffers for all the recursive children).


-- 
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: issues-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-nanoarrow] paleolimbot closed issue #5: Implement `ArrowArray*` helpers

Posted by GitBox <gi...@apache.org>.
paleolimbot closed issue #5: Implement `ArrowArray*` helpers
URL: https://github.com/apache/arrow-nanoarrow/issues/5


-- 
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: issues-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org