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

Method validate

bolt/vector/ComplexVector.cpp:643–669  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

641}
642
643void 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
671void RowVector::unsafeResize(vector_size_t newSize, bool setNotNull) {
672 BaseVector::resize(newSize, setNotNull);

Callers

nothing calls this directly

Calls 5

sizeFunction · 0.85
findLastBitFunction · 0.85
validateFunction · 0.50
minFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected