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

Method ConsumeArray

cpp/src/arrow/compute/kernels/aggregate_basic.inc.cc:806–825  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

804 }
805
806 Status ConsumeArray(const ArraySpan& arr_span) {
807 StateType local;
808
809 ArrayType arr(arr_span.ToArrayData());
810
811 const auto null_count = arr.null_count();
812 local.has_nulls = null_count > 0;
813 this->count += arr.length() - null_count;
814
815 if (!local.has_nulls) {
816 for (int64_t i = 0; i < arr.length(); i++) {
817 local.MergeOne(arr.GetView(i));
818 }
819 } else if (local.has_nulls && options.skip_nulls) {
820 local += ConsumeWithNulls(arr);
821 }
822
823 this->state += local;
824 return Status::OK();
825 }
826
827 Status MergeFrom(KernelContext*, KernelState&& src) override {
828 const auto& other = checked_cast<const ThisType&>(src);

Callers

nothing calls this directly

Calls 6

ToArrayDataMethod · 0.80
OKFunction · 0.50
null_countMethod · 0.45
lengthMethod · 0.45
MergeOneMethod · 0.45
GetViewMethod · 0.45

Tested by

no test coverage detected