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

Method ensureWritable

bolt/vector/BaseVector.cpp:596–609  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

594}
595
596void BaseVector::ensureWritable(const SelectivityVector& rows) {
597 auto newSize = std::max<vector_size_t>(rows.end(), length_);
598 if (nulls_ && !nulls_->isMutable()) {
599 BufferPtr newNulls = AlignedBuffer::allocate<bool>(newSize, pool_);
600 auto rawNewNulls = newNulls->asMutable<uint64_t>();
601 memcpy(rawNewNulls, rawNulls_, bits::nbytes(length_));
602
603 nulls_ = std::move(newNulls);
604 rawNulls_ = nulls_->as<uint64_t>();
605 }
606
607 this->resize(newSize);
608 this->setMayChangeContentUnderSameAddress(true);
609 this->resetDataDependentFlags(&rows);
610}
611
612void BaseVector::ensureWritable(

Callers 15

TEST_FFunction · 0.45
deserializeMethod · 0.45
toIntermediateImplMethod · 0.45
applyMethod · 0.45
applyMethod · 0.45
applyMethod · 0.45
applyMethod · 0.45
applyMethod · 0.45
applyMethod · 0.45
prepareResultsMethod · 0.45
prepareResultsMethod · 0.45

Calls 15

resizeMethod · 0.95
memcpyFunction · 0.85
nbytesFunction · 0.85
isMutableMethod · 0.80
containsUnknownMethod · 0.80
deselectMethod · 0.80
hasSelectionsMethod · 0.80
createFunction · 0.70
endMethod · 0.45
getMethod · 0.45
typeMethod · 0.45

Tested by 5

TEST_FFunction · 0.36
applyTypedMethod · 0.36
applyMethod · 0.36
applyMethod · 0.36
TEST_FFunction · 0.36