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

Method clearNulls

bolt/vector/BaseVector.cpp:433–453  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

431}
432
433void BaseVector::clearNulls(const SelectivityVector& nonNullRows) {
434 BOLT_CHECK(isNullsWritable());
435 if (!nulls_) {
436 return;
437 }
438
439 if (nonNullRows.isAllSelected() && nonNullRows.end() == length_) {
440 nulls_ = nullptr;
441 rawNulls_ = nullptr;
442 nullCount_ = 0;
443 return;
444 }
445
446 auto rawNulls = nulls_->asMutable<uint64_t>();
447 bits::orBits(
448 rawNulls,
449 nonNullRows.asRange().bits(),
450 std::min<vector_size_t>(length_, nonNullRows.begin()),
451 std::min<vector_size_t>(length_, nonNullRows.end()));
452 nullCount_ = std::nullopt;
453}
454
455void BaseVector::clearNulls(vector_size_t begin, vector_size_t end) {
456 BOLT_CHECK(isNullsWritable());

Callers 15

applyMethod · 0.45
copyValuesAndNullsMethod · 0.45
copyMethod · 0.45
TEST_FFunction · 0.45
readNullsFunction · 0.45
getValuesMethod · 0.45
getValuesMethod · 0.45
DataSetBuilder.cppFile · 0.45
prepareResultsMethod · 0.45
prepareResultsMethod · 0.45
prepareResultsMethod · 0.45
applyMethod · 0.45

Calls 8

isNullsWritableFunction · 0.85
orBitsFunction · 0.85
fillBitsFunction · 0.85
isAllSelectedMethod · 0.80
endMethod · 0.45
bitsMethod · 0.45
asRangeMethod · 0.45
beginMethod · 0.45

Tested by 3

TEST_FFunction · 0.36
applyTypedMethod · 0.36
applyMethod · 0.36