paleolimbot commented on PR #16:
URL: https://github.com/apache/arrow-nanoarrow/pull/16#issuecomment-1210685336

   Just a note that I'm reworking this interface based on some thoughts after 
working with this for a day or so:
   
   - Instead of copying all the buffer/bitmap methods for the array, just 
provide `ArrowArrayBuffer(array, i)` and `ArrowArrayValidityBitmap(array)` and 
let users pass that to all the buffer/bitmap methods. This is the fast way to 
do things...learn the spec and build the buffers yourself. Keeping the buffers 
as part of the array is nice because you don't have to remember to clean any of 
them up (just the topmost array).
   - Provide sqlite-inspired "append-by-value" appenders: 
`ArrowArrayAppendNull()`, `ArrowArrayAppendInt()`, `ArrowArrayAppendUint()`, 
`ArrowArrayAppendDouble()`, `ArrowArrayAppendString()` and maybe 
`ArrowArrayAppendBytes()`. This is slower but safer...the functions will return 
an error code if it's not possible to append that exact value.
   
   I think this reflects the two types of users: (1) the people that already 
know the spec and (2) the people that don't want to know the spec.


-- 
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: issues-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to