| 641 | } |
| 642 | |
| 643 | void RowVector::validate(const VectorValidateOptions& options) const { |
| 644 | BaseVector::validate(options); |
| 645 | vector_size_t lastNonNullIndex{size()}; |
| 646 | |
| 647 | if (nulls_) { |
| 648 | lastNonNullIndex = bits::findLastBit(nulls_->as<uint64_t>(), 0, size()); |
| 649 | } |
| 650 | |
| 651 | for (auto& child : children_) { |
| 652 | // TODO: Currently we aren't checking for null children on ROWs |
| 653 | // since there are cases in SelectiveStructReader/DWIO/Koski where |
| 654 | // ROW Vectors with null children are created. |
| 655 | if (child != nullptr) { |
| 656 | child->validate(options); |
| 657 | if (child->size() < size()) { |
| 658 | BOLT_CHECK_NOT_NULL( |
| 659 | nulls_, |
| 660 | "Child vector has size less than parent and parent has no nulls."); |
| 661 | |
| 662 | BOLT_CHECK_GT( |
| 663 | child->size(), |
| 664 | lastNonNullIndex, |
| 665 | "Child vector has size less than last non null row."); |
| 666 | } |
| 667 | } |
| 668 | } |
| 669 | } |
| 670 | |
| 671 | void RowVector::unsafeResize(vector_size_t newSize, bool setNotNull) { |
| 672 | BaseVector::resize(newSize, setNotNull); |
nothing calls this directly
no test coverage detected