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

Method loadVectorInternal

bolt/vector/LazyVector.cpp:290–313  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

288}
289
290void LazyVector::loadVectorInternal() const {
291 if (!allLoaded_) {
292 if (!vector_) {
293 vector_ = BaseVector::create(type_, 0, pool_);
294 }
295 SelectivityVector allRows(BaseVector::length_);
296 loader_->load(allRows, nullptr, size(), &vector_);
297 BOLT_CHECK_NOT_NULL(vector_);
298 if (vector_->encoding() == VectorEncoding::Simple::LAZY) {
299 vector_ = vector_->asUnchecked<LazyVector>()->loadedVectorShared();
300 } else {
301 // If the load produced a wrapper, load the wrapped vector.
302 vector_->loadedVector();
303 }
304 allLoaded_ = true;
305 const_cast<LazyVector*>(this)->BaseVector::nulls_ = vector_->nulls_;
306 if (BaseVector::nulls_) {
307 const_cast<LazyVector*>(this)->BaseVector::rawNulls_ =
308 BaseVector::nulls_->as<uint64_t>();
309 }
310 } else {
311 BOLT_CHECK_NOT_NULL(vector_);
312 }
313}
314} // namespace bytedance::bolt

Callers

nothing calls this directly

Calls 5

sizeFunction · 0.85
createFunction · 0.70
loadMethod · 0.45
encodingMethod · 0.45
loadedVectorMethod · 0.45

Tested by

no test coverage detected