| 673 | } |
| 674 | |
| 675 | void RowVector::resize(vector_size_t newSize, bool setNotNull) { |
| 676 | const auto oldSize = size(); |
| 677 | BaseVector::resize(newSize, setNotNull); |
| 678 | |
| 679 | // Resize all the children. |
| 680 | for (auto& child : children_) { |
| 681 | if (child != nullptr) { |
| 682 | if (child->isLazy()) { |
| 683 | BOLT_FAIL("Resize on a lazy vector is not allowed"); |
| 684 | } |
| 685 | |
| 686 | // If we are just reducing the size of the vector, its safe |
| 687 | // to skip uniqueness check since effectively we are just changing |
| 688 | // the length. |
| 689 | if (newSize > oldSize) { |
| 690 | BOLT_CHECK(child.use_count() == 1, "Resizing shared child vector"); |
| 691 | child->resize(newSize, setNotNull); |
| 692 | } |
| 693 | } |
| 694 | } |
| 695 | } |
| 696 | |
| 697 | // static |
| 698 | bool RowVector::isComposite(const std::shared_ptr<RowVector>& input) { |
no test coverage detected