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

Method Resize

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

Source from the content-addressed store, hash-verified

758 }
759
760 Status Resize(int64_t new_num_groups) override {
761 auto added_groups = new_num_groups - num_groups_;
762 num_groups_ = new_num_groups;
763 // Reusing AntiExtrema as uninitialized value here because it doesn't
764 // matter what the value is. We never output the uninitialized
765 // first/last value.
766 RETURN_NOT_OK(firsts_.Append(added_groups, AntiExtrema<CType>::anti_min()));
767 RETURN_NOT_OK(lasts_.Append(added_groups, AntiExtrema<CType>::anti_max()));
768 RETURN_NOT_OK(has_values_.Append(added_groups, false));
769 RETURN_NOT_OK(first_is_nulls_.Append(added_groups, false));
770 RETURN_NOT_OK(last_is_nulls_.Append(added_groups, false));
771 RETURN_NOT_OK(has_any_values_.Append(added_groups, false));
772 return Status::OK();
773 }
774
775 Status Consume(const ExecSpan& batch) override {
776 auto raw_firsts = firsts_.mutable_data();

Callers

nothing calls this directly

Calls 2

OKFunction · 0.50
AppendMethod · 0.45

Tested by

no test coverage detected