| 900 | vector->prepareForReuse(); |
| 901 | vector->resize(size); |
| 902 | } |
| 903 | |
| 904 | void BaseVector::reuseNulls() { |
| 905 | // Check nulls buffer. Keep the buffer if singly-referenced and mutable and |
| 906 | // there is at least one null bit set. Reset otherwise. |
| 907 | if (nulls_) { |
| 908 | if (nulls_->isMutable()) { |
| 909 | if (0 == BaseVector::countNulls(nulls_, length_)) { |
| 910 | nulls_ = nullptr; |
| 911 | rawNulls_ = nullptr; |
| 912 | } |
| 913 | } else { |
| 914 | nulls_ = nullptr; |
| 915 | rawNulls_ = nullptr; |
| 916 | } |
| 917 | } |
| 918 | } |
| 919 |
no test coverage detected