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

Method Merge

cpp/src/arrow/compute/kernels/hash_aggregate.cc:120–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118 }
119
120 Status Merge(GroupedAggregator&& raw_other,
121 const ArrayData& group_id_mapping) override {
122 auto other = checked_cast<GroupedCountImpl*>(&raw_other);
123
124 auto* counts = counts_.mutable_data_as<int64_t>();
125 const auto* other_counts = other->counts_.data_as<int64_t>();
126
127 auto* g = group_id_mapping.GetValues<uint32_t>(1);
128 for (int64_t other_g = 0; other_g < group_id_mapping.length; ++other_g, ++g) {
129 counts[*g] += other_counts[other_g];
130 }
131 return Status::OK();
132 }
133
134 template <bool count_valid>
135 struct RunEndEncodedCountImpl {

Callers

nothing calls this directly

Calls 1

OKFunction · 0.50

Tested by

no test coverage detected