MCPcopy Create free account
hub / github.com/apache/arrow / AllocateNullBitmap

Function AllocateNullBitmap

python/pyarrow/src/arrow/python/numpy_to_arrow.cc:78–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 2

VisitMethod · 0.85
InitNullBitmapMethod · 0.85

Calls 3

BytesForBitsFunction · 0.85
OKFunction · 0.50
mutable_dataMethod · 0.45

Tested by

no test coverage detected