lidavidm commented on code in PR #16:
URL: https://github.com/apache/arrow-nanoarrow/pull/16#discussion_r942446454
##########
src/nanoarrow/nanoarrow.h:
##########
@@ -508,9 +512,31 @@ void ArrowArraySetValidityBitmap(struct ArrowArray* array,
struct ArrowBitmap* b
ArrowErrorCode ArrowArraySetBuffer(struct ArrowArray* array, int64_t i,
struct ArrowBuffer* buffer);
+static inline struct ArrowBitmap* ArrowArrayValidityBitmap(struct ArrowArray*
array);
+
+static inline struct ArrowBuffer* ArrowArrayBuffer(struct ArrowArray* array,
int64_t i);
+
+static inline ArrowErrorCode ArrowArrayReserve(struct ArrowArray* array,
+ int64_t
additional_size_elements);
+
+static inline ArrowErrorCode ArrowArrayResize(struct ArrowArray* array,
+ int64_t new_capacity_elements,
+ char shrink_to_fit);
+
+static inline ArrowErrorCode ArrowArrayAppendNull(struct ArrowArray* array,
int64_t n);
+
+static inline ArrowErrorCode ArrowArrayAppendInt(struct ArrowArray* array,
int64_t value);
Review Comment:
I suppose these sorts of appends are useful for convenience, but in an
application that already knows the type, I'd rather have appenders that don't
perform those checks in the first place. As you mention, there's the low-level
append still. That requires the optimizer to see through the memcpy (which I
would expect it to), but we'd want to confirm.
--
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]