| 176 | |
| 177 | template <typename offset_type> |
| 178 | int64_t SumOfListViewSizes(const ArraySpan& input) { |
| 179 | DCHECK(is_list_view(*input.type)); |
| 180 | const uint8_t* validity = input.buffers[0].data; |
| 181 | const auto* sizes = input.GetValues<offset_type>(2); |
| 182 | int64_t sum = 0; |
| 183 | arrow::internal::VisitSetBitRunsVoid( |
| 184 | validity, input.offset, input.length, |
| 185 | [&sum, sizes](int64_t run_start, int64_t run_length) { |
| 186 | for (int64_t i = run_start; i < run_start + run_length; ++i) { |
| 187 | sum += sizes[i]; |
| 188 | } |
| 189 | }); |
| 190 | return sum; |
| 191 | } |
| 192 | |
| 193 | } // namespace |
| 194 |
nothing calls this directly
no test coverage detected