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

Method reuseNulls

bolt/vector/BaseVector.cpp:902–916  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

900 vector->prepareForReuse();
901 vector->resize(size);
902}
903
904void BaseVector::reuseNulls() {
905 // Check nulls buffer. Keep the buffer if singly-referenced and mutable and
906 // there is at least one null bit set. Reset otherwise.
907 if (nulls_) {
908 if (nulls_->isMutable()) {
909 if (0 == BaseVector::countNulls(nulls_, length_)) {
910 nulls_ = nullptr;
911 rawNulls_ = nullptr;
912 }
913 } else {
914 nulls_ = nullptr;
915 rawNulls_ = nullptr;
916 }
917 }
918}
919

Callers 1

tryReuseResultFunction · 0.80

Calls 2

isMutableMethod · 0.80
countNullsFunction · 0.70

Tested by

no test coverage detected