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

Function SumOfListSizes

cpp/src/arrow/util/list_util.cc:164–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162
163template <typename offset_type>
164int64_t SumOfListSizes(const ArraySpan& input) {
165 DCHECK(is_var_length_list(*input.type));
166 const uint8_t* validity = input.buffers[0].data;
167 const auto* offsets = input.GetValues<offset_type>(1);
168 int64_t sum = 0;
169 arrow::internal::VisitSetBitRunsVoid(
170 validity, input.offset, input.length,
171 [&sum, offsets](int64_t run_start, int64_t run_length) {
172 sum += offsets[run_start + run_length + 1] - offsets[run_start];
173 });
174 return sum;
175}
176
177template <typename offset_type>
178int64_t SumOfListViewSizes(const ArraySpan& input) {

Callers

nothing calls this directly

Calls 2

is_var_length_listFunction · 0.85
VisitSetBitRunsVoidFunction · 0.85

Tested by

no test coverage detected