You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "paleolimbot (via GitHub)" <gi...@apache.org> on 2023/03/09 19:15:43 UTC

[GitHub] [arrow-nanoarrow] paleolimbot commented on issue #156: [C] Set vector length in array struct

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

   You'll have to set the lengths of child arrays by yourself if you're constructing the arrays "by hand" (i.e., by filling in or pointing to your own buffers). If you do this incorrectly you should get an error when you call `ArrowArrayFinishBuilding()`, and if you're building arrays element-wise (i.e., using `ArrowArrayAppendXXX()`), `ArrowArrayFinishElement()` will check child lengths of children and increment the length of the parent to match.
   
   FWIW I might also suggest `ArrowSchemaInit()` + `ArrowSchemaSetTypeStruct()` + `ArrowArrayInitFromSchema()` (but what you have there is fine too).


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

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