| 212 | } |
| 213 | |
| 214 | int64_t ArrayData::GetNullCount() const { |
| 215 | int64_t precomputed = this->null_count.load(); |
| 216 | if (ARROW_PREDICT_FALSE(precomputed == kUnknownNullCount)) { |
| 217 | if (this->buffers[0]) { |
| 218 | precomputed = this->length - |
| 219 | CountSetBits(this->buffers[0]->data(), this->offset, this->length); |
| 220 | } else { |
| 221 | precomputed = 0; |
| 222 | } |
| 223 | this->null_count.store(precomputed); |
| 224 | } |
| 225 | return precomputed; |
| 226 | } |
| 227 | |
| 228 | int64_t ArrayData::ComputeLogicalNullCount() const { |
| 229 | if (this->buffers[0] && this->type->id() != Type::DICTIONARY) { |