paleolimbot commented on issue #67:
URL: https://github.com/apache/arrow-nanoarrow/issues/67#issuecomment-1324185749

   Cool! I will open a "roadmap" issue shortly...it should exist somewhere.
   
   I think what you are after might be a good fit for the C library ( see 
https://apache.github.io/arrow-nanoarrow/dev/c.html#creating-arrays ), which 
would let you construct a RecordBatch with perhaps less indirection. Your 
example might be something like:
   
   ```c
   struct ArrowSchema schema;
   ArrowSchemaInit(&schema, NANOARROW_TYPE_STRUCT);
   ArrowSchemaAllocateChildren(&schema, ncol);
   
   struct ArrowArrray array;
   ArrowArrayInit(&array, NANOARROW_TYPE_STRUCT);
   ArrowArrayAllocateChildren(&array, ncol);
   array.length = rows;
   array.null_count = -1;
   for (size_t i=0; i<ncol; i++) {
     // ...fill in schema.children and array.children
   }
   ```
   
   That said, as long as the external pointers carry the class 
`"nanoarrow_schema"`, `"nanoarrow_array"` and `"nanoarrow_array_stream"` I 
think an "arch" package that provides that type of C API would happily augment 
anything that exists in nanoarrow. I don't envision providing access to C 
callables in the initial release, mostly because my development focus will be 
on more user-facing behaviour (like ALTREP conversions).


-- 
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: github-unsubscr...@arrow.apache.org

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

Reply via email to