lidavidm commented on code in PR #26: URL: https://github.com/apache/arrow-nanoarrow/pull/26#discussion_r951541341
########## src/nanoarrow/array_inline.h: ########## @@ -445,6 +445,179 @@ static inline ArrowErrorCode ArrowArrayFinishElement(struct ArrowArray* array) { return NANOARROW_OK; } +static inline int8_t ArrowArrayViewIsNull(struct ArrowArrayView* array_view, int64_t i) { + const uint8_t* validity_buffer = array_view->buffer_views[0].data.as_uint8; + i += array_view->array->offset; + switch (array_view->storage_type) { + case NANOARROW_TYPE_NA: + return 0x01; + case NANOARROW_TYPE_DENSE_UNION: + case NANOARROW_TYPE_SPARSE_UNION: + // Not supported yet + return 0xff; Review Comment: Right, but I'd say conceptually, the union array itself is always valid. -- 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