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

Method MergeFrom

cpp/src/arrow/compute/kernels/aggregate_pivot.cc:125–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123 }
124
125 Status MergeFrom(KernelContext*, KernelState&& src) override {
126 const auto& other_state = checked_cast<const PivotImpl&>(src);
127 for (int64_t key = 0; key < static_cast<int64_t>(values_.size()); ++key) {
128 if (other_state.values_[key]->is_valid) {
129 if (ARROW_PREDICT_FALSE(values_[key]->is_valid)) {
130 return DuplicateValue();
131 }
132 values_[key] = other_state.values_[key];
133 }
134 }
135 return Status::OK();
136 }
137
138 Status Finalize(KernelContext* ctx, Datum* out) override {
139 *out = std::make_shared<StructScalar>(std::move(values_), out_type_);

Callers

nothing calls this directly

Calls 2

OKFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected