| 75 | namespace { |
| 76 | |
| 77 | Status AllocateNullBitmap(MemoryPool* pool, int64_t length, |
| 78 | std::shared_ptr<ResizableBuffer>* out) { |
| 79 | int64_t null_bytes = bit_util::BytesForBits(length); |
| 80 | ARROW_ASSIGN_OR_RAISE(auto null_bitmap, AllocateResizableBuffer(null_bytes, pool)); |
| 81 | |
| 82 | // Padding zeroed by AllocateResizableBuffer |
| 83 | memset(null_bitmap->mutable_data(), 0, static_cast<size_t>(null_bytes)); |
| 84 | *out = std::move(null_bitmap); |
| 85 | return Status::OK(); |
| 86 | } |
| 87 | |
| 88 | // ---------------------------------------------------------------------- |
| 89 | // Conversion from NumPy-in-Pandas to Arrow null bitmap |
no test coverage detected