| 45 | // ChunkedArray methods |
| 46 | |
| 47 | ChunkedArray::ChunkedArray(ArrayVector chunks, std::shared_ptr<DataType> type) |
| 48 | : chunks_(std::move(chunks)), |
| 49 | type_(std::move(type)), |
| 50 | length_(0), |
| 51 | null_count_(0), |
| 52 | chunk_resolver_{chunks_} { |
| 53 | if (type_ == nullptr) { |
| 54 | ARROW_CHECK_GT(chunks_.size(), static_cast<size_t>(0)) |
| 55 | << "cannot construct ChunkedArray from empty vector and omitted type"; |
| 56 | type_ = chunks_[0]->type(); |
| 57 | } |
| 58 | ARROW_CHECK_LE(chunks.size(), static_cast<size_t>(std::numeric_limits<int>::max())); |
| 59 | for (const auto& chunk : chunks_) { |
| 60 | length_ += chunk->length(); |
| 61 | null_count_ += chunk->null_count(); |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | int64_t ChunkedArray::ComputeLogicalNullCount() const { |
| 66 | int64_t count = 0; |
nothing calls this directly
no test coverage detected