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

Method Merge

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

Source from the content-addressed store, hash-verified

1588 }
1589
1590 Status Merge(GroupedAggregator&& raw_other,
1591 const ArrayData& group_id_mapping) override {
1592 auto other = checked_cast<GroupedOneImpl*>(&raw_other);
1593
1594 auto raw_ones = ones_.mutable_data();
1595 auto other_raw_ones = other->ones_.mutable_data();
1596
1597 auto g = group_id_mapping.GetValues<uint32_t>(1);
1598 for (uint32_t other_g = 0; static_cast<int64_t>(other_g) < group_id_mapping.length;
1599 ++other_g, ++g) {
1600 if (!bit_util::GetBit(has_one_.data(), *g)) {
1601 if (bit_util::GetBit(other->has_one_.data(), other_g)) {
1602 GetSet::Set(raw_ones, *g, GetSet::Get(other_raw_ones, other_g));
1603 bit_util::SetBit(has_one_.mutable_data(), *g);
1604 }
1605 }
1606 }
1607
1608 return Status::OK();
1609 }
1610
1611 Result<Datum> Finalize() override {
1612 ARROW_ASSIGN_OR_RAISE(auto null_bitmap, has_one_.Finish());

Callers 4

MergeFromMethod · 0.45
HashAggregateMergeFunction · 0.45
SortInternalMethod · 0.45
MergeInternalMethod · 0.45

Calls 6

SetBitFunction · 0.85
GetBitFunction · 0.50
GetFunction · 0.50
OKFunction · 0.50
mutable_dataMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected