| 431 | } |
| 432 | |
| 433 | void BaseVector::clearNulls(const SelectivityVector& nonNullRows) { |
| 434 | BOLT_CHECK(isNullsWritable()); |
| 435 | if (!nulls_) { |
| 436 | return; |
| 437 | } |
| 438 | |
| 439 | if (nonNullRows.isAllSelected() && nonNullRows.end() == length_) { |
| 440 | nulls_ = nullptr; |
| 441 | rawNulls_ = nullptr; |
| 442 | nullCount_ = 0; |
| 443 | return; |
| 444 | } |
| 445 | |
| 446 | auto rawNulls = nulls_->asMutable<uint64_t>(); |
| 447 | bits::orBits( |
| 448 | rawNulls, |
| 449 | nonNullRows.asRange().bits(), |
| 450 | std::min<vector_size_t>(length_, nonNullRows.begin()), |
| 451 | std::min<vector_size_t>(length_, nonNullRows.end())); |
| 452 | nullCount_ = std::nullopt; |
| 453 | } |
| 454 | |
| 455 | void BaseVector::clearNulls(vector_size_t begin, vector_size_t end) { |
| 456 | BOLT_CHECK(isNullsWritable()); |