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

Function AllocateNullBitmap

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

Source from the content-addressed store, hash-verified

75namespace {
76
77Status 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

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