paleolimbot commented on code in PR #16:
URL: https://github.com/apache/arrow-nanoarrow/pull/16#discussion_r942470780


##########
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:
   Give me a day or so to flush this out...sometimes when I start typing it 
becomes immediately obvious that it was a bad idea. The tests will provide a 
good starting place for benchmarks (I was planning to use Arrow's builder to 
build some things and this builder to build some things and compare).
   
   In the context of a database driver, you'd be doing a 
`switch(database_type)` or `switch(arrow_type)` for every row anyway...this 
would just move that branch inside nanoarrow (I think).



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