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

Function CountValues

cpp/src/arrow/compute/kernels/util_internal.h:90–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88// 'counts' must be zeroed and with enough size.
89template <typename T>
90ARROW_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
104template <typename T>
105int64_t CountValues(const ChunkedArray& values, T min, uint64_t* counts) {

Callers 1

SortInternalMethod · 0.85

Calls 4

VisitSetBitRunsVoidFunction · 0.85
GetNullCountMethod · 0.80
chunksMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected