| 88 | // 'counts' must be zeroed and with enough size. |
| 89 | template <typename T> |
| 90 | ARROW_NOINLINE int64_t CountValues(const ArraySpan& data, T min, uint64_t* counts) { |
| 91 | const int64_t n = data.length - data.GetNullCount(); |
| 92 | if (n > 0) { |
| 93 | const T* values = data.GetValues<T>(1); |
| 94 | arrow::internal::VisitSetBitRunsVoid(data.buffers[0].data, data.offset, data.length, |
| 95 | [&](int64_t pos, int64_t len) { |
| 96 | for (int64_t i = 0; i < len; ++i) { |
| 97 | ++counts[values[pos + i] - min]; |
| 98 | } |
| 99 | }); |
| 100 | } |
| 101 | return n; |
| 102 | } |
| 103 | |
| 104 | template <typename T> |
| 105 | int64_t CountValues(const ChunkedArray& values, T min, uint64_t* counts) { |
no test coverage detected