MCPcopy Create free account
hub / github.com/bytedance/bolt / copyNullsBuffer

Function copyNullsBuffer

bolt/vector/DecodedVector.cpp:378–389  ·  view source on GitHub ↗

Copies 'size' bits from 'nulls' into a newly allocated buffer. Returns nullptr if 'nulls' is null.

Source from the content-addressed store, hash-verified

376/// Copies 'size' bits from 'nulls' into a newly allocated buffer. Returns
377/// nullptr if 'nulls' is null.
378BufferPtr copyNullsBuffer(
379 const uint64_t* nulls,
380 vector_size_t size,
381 memory::MemoryPool* pool) {
382 if (!nulls) {
383 return nullptr;
384 }
385
386 BufferPtr copy = AlignedBuffer::allocate<bool>(size, pool);
387 memcpy(copy->asMutable<uint64_t>(), nulls, BaseVector::byteSize<bool>(size));
388 return copy;
389}
390} // namespace
391
392DecodedVector::DictionaryWrapping DecodedVector::dictionaryWrapping(

Callers 1

dictionaryWrappingMethod · 0.85

Calls 1

memcpyFunction · 0.85

Tested by

no test coverage detected