You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by GitBox <gi...@apache.org> on 2022/07/26 18:51:27 UTC

[GitHub] [arrow-nanoarrow] paleolimbot opened a new issue, #4: Implement bitmap helpers

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

   Dealing with bitmaps is hard and we should provide some tools to do the finicky hard-to-get-right math:
   
   - `ArrowBitmapIsNull(const void* bitmap, int64_t i)`
   - `ArrowBitmapSetNull(void* bitmap, int64_t i, char value)`
   - `ArrowBitmapCountNull(const void* bitmap, int64_t bitmap_size_bits)`
   
   I think we also need a builder dedicated to bitmaps since building them up incrementally (without allocating if there are no null) is much of the use case. Something like
   
   ```
   struct ArrowBitmapBuilder { struct ArrowBuffer buffer; int64_t n_values; uint8_t pending_values[64]; int8_t pending_values_offset; }
   ArrowBitmapBuilderAppendInt8(struct ArrowBitmapBuilder* bitmap_builder, const int8_t* values, int64_t n_values);
   ArrowBitmapBuilderAppendInt32(struct ArrowBitmapBuilder* bitmap_builder, const int32_t* values, int64_t n_values);
   ArrowBitmapBuilderReset(struct ArrowBitmapBuilder* bitmap_builder);
   ```
   
   (because char and int arrays are common ways that these things are stored)


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

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


[GitHub] [arrow-nanoarrow] paleolimbot closed issue #4: Implement bitmap helpers

Posted by GitBox <gi...@apache.org>.
paleolimbot closed issue #4: Implement bitmap helpers
URL: https://github.com/apache/arrow-nanoarrow/issues/4


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

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