You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/11/24 14:44:46 UTC

[GitHub] [arrow-nanoarrow] paleolimbot opened a new issue, #70: [C] Add convenience functions

paleolimbot opened a new issue, #70:
URL: https://github.com/apache/arrow-nanoarrow/issues/70

   ...based on writing some nanoarrow code in the R package, https://github.com/geoarrow/geoarrow-cpp/ , and https://github.com/paleolimbot/minigpkg/
   
   A few that may be nice are:
   
   - `ArrowBufferAppendStringView()` (i.e., `ArrowBufferAppendStringView(buffer, ArrowCharView("some string");`)
   - `ArrowBufferAppendBufferView()` (i.e., `ArrowBufferAppendBufferView(buffer, some_array_view->buffer_views[1])`)
   - `ArrowArrayMove(struct ArrowArray* src, struct ArrowArray* dst)`, `ArrowSchemaMove(struct ArrowSchema* src, struct ArrowSchema* dst)`, and `ArrowArrayStreamMove(struct ArrowArrayStream* src, struct ArrowArrayStream* dst)` (more readable than `memcpy(dst, src, sizeof(struct ArrowSomething); src->release = NULL;`)
   
   Another thing that came up is a pattern for unsafe appends. The buffer appenders in the `ArrowBufferAppendInt32()` family all check and possibly reallocate; the array appenders in the `ArrowArrayAppendInt()` family do a `switch()` on type and range checks to help prevent implicit overflow. Adding more convenience around this like maybe `ArrowBufferAppendInt32Unsafe()` or `ArrowArrayInt32AppendInt32Unsafe()` is probably very verbose and isn't that hard to work around. I could be convinced either way on whether they should exist or not.


-- 
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-unsubscribe@arrow.apache.org.apache.org

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


[GitHub] [arrow-nanoarrow] paleolimbot commented on issue #70: [C] Add convenience functions

Posted by GitBox <gi...@apache.org>.
paleolimbot commented on issue #70:
URL: https://github.com/apache/arrow-nanoarrow/issues/70#issuecomment-1327842488

   I forget exactly where I did that but I definitely did it too at least once (I think I was building error messages).


-- 
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-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-nanoarrow] lidavidm commented on issue #70: [C] Add convenience functions

Posted by GitBox <gi...@apache.org>.
lidavidm commented on issue #70:
URL: https://github.com/apache/arrow-nanoarrow/issues/70#issuecomment-1327835369

   At the risk of turning into a general C utilities library, I've found having a string builder utility also useful in the ADBC SQLite driver I'm working on.


-- 
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-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-nanoarrow] paleolimbot commented on issue #70: [C] Add convenience functions

Posted by GitBox <gi...@apache.org>.
paleolimbot commented on issue #70:
URL: https://github.com/apache/arrow-nanoarrow/issues/70#issuecomment-1327843074

   Oh! It's was in nanoarrow itself but I changed approaches...it was the first draft of the `ArrowSchemaToString()`.


-- 
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-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-nanoarrow] paleolimbot closed issue #70: [C] Add convenience functions

Posted by GitBox <gi...@apache.org>.
paleolimbot closed issue #70: [C] Add convenience functions
URL: https://github.com/apache/arrow-nanoarrow/issues/70


-- 
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-unsubscribe@arrow.apache.org

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