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

Method ComputeLogicalNullCount

cpp/src/arrow/datum.cc:150–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148}
149
150int64_t Datum::ComputeLogicalNullCount() const {
151 if (this->kind() == Datum::ARRAY) {
152 return std::get<std::shared_ptr<ArrayData>>(this->value)->ComputeLogicalNullCount();
153 } else if (this->kind() == Datum::CHUNKED_ARRAY) {
154 return std::get<std::shared_ptr<ChunkedArray>>(this->value)
155 ->ComputeLogicalNullCount();
156 } else if (this->kind() == Datum::SCALAR) {
157 const auto& val = *std::get<std::shared_ptr<Scalar>>(this->value);
158 return val.IsLogicalNull() ? 1 : 0;
159 } else {
160 DCHECK(false) << "This function only valid for scalar or array-like values";
161 return 0;
162 }
163}
164
165ArrayVector Datum::chunks() const {
166 if (!this->is_arraylike()) {

Callers 2

TEST_FFunction · 0.45
TESTFunction · 0.45

Calls 2

IsLogicalNullMethod · 0.80
kindMethod · 0.45

Tested by 2

TEST_FFunction · 0.36
TESTFunction · 0.36