lidavidm commented on code in PR #82:
URL: https://github.com/apache/arrow-nanoarrow/pull/82#discussion_r1042613528


##########
src/nanoarrow/nanoarrow.h:
##########
@@ -835,6 +838,15 @@ static inline ArrowErrorCode ArrowArrayAppendString(struct 
ArrowArray* array,
 /// length of the child array(s) did not match the expected length.
 static inline ArrowErrorCode ArrowArrayFinishElement(struct ArrowArray* array);
 
+/// \brief Finish a union array element
+///
+/// Appends an element to the union type ids buffer and increments 
array->length.
+/// For sparse unions, up to one element is added to non type-id children. 
Returns
+/// EINVAL if the underlying storage type is not a union, if type_id is not 
valid,
+/// or if child sizes after appending are inconsistent.
+static inline ArrowErrorCode ArrowArrayFinishUnionElement(struct ArrowArray* 
array,
+                                                          int32_t type_id);

Review Comment:
   I'm mostly just saying that 'mode' or 'standard type ID' from an API 
perspective, or Arrow perspective, is not a thing - and that the current API 
seems sufficient. Internally the checks/assumptions sound fine for now.



-- 
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]

Reply via email to