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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
