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

Method makeNulls

bolt/vector/tests/utils/VectorTestBase.cpp:106–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106BufferPtr VectorTestBase::makeNulls(
107 vector_size_t size,
108 std::function<bool(vector_size_t /*row*/)> isNullAt) {
109 auto nulls = AlignedBuffer::allocate<bool>(size, pool());
110 auto rawNulls = nulls->asMutable<uint64_t>();
111 for (auto i = 0; i < size; i++) {
112 bits::setNull(rawNulls, i, isNullAt(i));
113 }
114 return nulls;
115}
116
117BufferPtr VectorTestBase::makeNulls(const std::vector<bool>& values) {
118 auto nulls = allocateNulls(values.size(), pool());

Callers

nothing calls this directly

Calls 5

allocateNullsFunction · 0.85
poolFunction · 0.70
setNullFunction · 0.50
isNullAtFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected