| 484 | } |
| 485 | |
| 486 | BaseVector* RowVector::loadedVector() { |
| 487 | if (childrenLoaded_) { |
| 488 | return this; |
| 489 | } |
| 490 | containsLazyNotLoaded_ = false; |
| 491 | for (auto i = 0; i < childrenSize_; ++i) { |
| 492 | if (!children_[i]) { |
| 493 | continue; |
| 494 | } |
| 495 | auto& newChild = BaseVector::loadedVectorShared(children_[i]); |
| 496 | // This is not needed but can potentially optimize decoding speed later. |
| 497 | if (children_[i].get() != newChild.get()) { |
| 498 | children_[i] = newChild; |
| 499 | } |
| 500 | if (isLazyNotLoaded(*children_[i])) { |
| 501 | containsLazyNotLoaded_ = true; |
| 502 | } |
| 503 | } |
| 504 | childrenLoaded_ = true; |
| 505 | return this; |
| 506 | } |
| 507 | |
| 508 | void RowVector::updateContainsLazyNotLoaded() const { |
| 509 | childrenLoaded_ = false; |