cocoa-xu commented on code in PR #507:
URL: https://github.com/apache/arrow-nanoarrow/pull/507#discussion_r1627937206
##########
src/nanoarrow/array_inline.h:
##########
@@ -661,6 +661,44 @@ static inline ArrowErrorCode
ArrowArrayFinishElement(struct ArrowArray* array) {
}
}
break;
+
+ case NANOARROW_TYPE_RUN_END_ENCODED:
+ if (array->children[0]->length != array->children[1]->length) {
+ return EINVAL;
+ }
+ if (array->children[0]->null_count != 0) {
+ return EINVAL;
+ }
+ array->length = 0;
+ struct ArrowBuffer* data_buffer;
+ data_buffer = ArrowArrayBuffer(array->children[0], 1);
+ for (int64_t i = 0; i < array->children[0]->length; i++) {
Review Comment:
Maybe `ArrowArrayFinishRunEndEncoded` might be better as it's more
suggestive from its name and less confusion?
--
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]