| 288 | } |
| 289 | |
| 290 | void 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 |
nothing calls this directly
no test coverage detected