| 119 | } |
| 120 | |
| 121 | void DecodedVector::reset(vector_size_t size) { |
| 122 | if (!indicesNotCopied()) { |
| 123 | // Init with default value to avoid invalid indices for unselected rows) |
| 124 | std::fill(copiedIndices_.begin(), copiedIndices_.end(), 0); |
| 125 | } |
| 126 | size_ = size; |
| 127 | indices_ = nullptr; |
| 128 | data_ = nullptr; |
| 129 | nulls_ = nullptr; |
| 130 | allNulls_.reset(); |
| 131 | baseVector_ = nullptr; |
| 132 | mayHaveNulls_ = false; |
| 133 | hasExtraNulls_ = false; |
| 134 | isConstantMapping_ = false; |
| 135 | isIdentityMapping_ = false; |
| 136 | constantIndex_ = 0; |
| 137 | } |
| 138 | |
| 139 | void DecodedVector::copyNulls(vector_size_t size) { |
| 140 | auto numWords = bits::nwords(size); |