MCPcopy Create free account
hub / github.com/apache/arrow / null_count

Method null_count

cpp/src/arrow/datum.cc:136–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134}
135
136int64_t Datum::null_count() const {
137 if (this->kind() == Datum::ARRAY) {
138 return std::get<std::shared_ptr<ArrayData>>(this->value)->GetNullCount();
139 } else if (this->kind() == Datum::CHUNKED_ARRAY) {
140 return std::get<std::shared_ptr<ChunkedArray>>(this->value)->null_count();
141 } else if (this->kind() == Datum::SCALAR) {
142 const auto& val = *std::get<std::shared_ptr<Scalar>>(this->value);
143 return val.is_valid ? 0 : 1;
144 } else {
145 DCHECK(false) << "This function only valid for array-like values";
146 return 0;
147 }
148}
149
150ArrayVector Datum::chunks() const {
151 if (!this->is_arraylike()) {

Callers 15

garrow_array_get_n_nullsFunction · 0.45
ChunkedArrayMethod · 0.45
EqualsMethod · 0.45
RecordBatchToTensorFunction · 0.45
TESTFunction · 0.45
WriteValidityBitmapMethod · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45

Calls 2

GetNullCountMethod · 0.80
kindMethod · 0.45

Tested by 4

TESTFunction · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36