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

Method InsertNull

cpp/src/arrow/json/chunked_builder.cc:255–267  ·  view source on GitHub ↗

call from Insert() only, with mutex_ locked

Source from the content-addressed store, hash-verified

253 private:
254 // call from Insert() only, with mutex_ locked
255 Status InsertNull(int64_t block_index, int64_t length) {
256 value_builder_->Insert(block_index, value_field_, std::make_shared<NullArray>(0));
257
258 ARROW_ASSIGN_OR_RAISE(null_bitmap_chunks_[block_index],
259 AllocateEmptyBitmap(length, pool_));
260
261 int64_t offsets_length = (length + 1) * sizeof(int32_t);
262 ARROW_ASSIGN_OR_RAISE(offset_chunks_[block_index],
263 AllocateBuffer(offsets_length, pool_));
264 std::memset(offset_chunks_[block_index]->mutable_data(), 0, offsets_length);
265
266 return Status::OK();
267 }
268
269 std::mutex mutex_;
270 MemoryPool* pool_;

Callers

nothing calls this directly

Calls 6

AllocateEmptyBitmapFunction · 0.85
OKFunction · 0.70
ARROW_ASSIGN_OR_RAISEFunction · 0.50
AllocateBufferFunction · 0.50
InsertMethod · 0.45
mutable_dataMethod · 0.45

Tested by

no test coverage detected