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

Method ExecChunked

cpp/src/arrow/compute/kernels/aggregate_mode.cc:166–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164 }
165
166 Status ExecChunked(KernelContext* ctx, const ExecBatch& batch, Datum* out) {
167 // count values in all chunks, ignore nulls
168 const ChunkedArray& values = *batch[0].chunked_array();
169 const ModeOptions& options = ModeState::Get(ctx);
170 ExecResult result;
171 if ((!options.skip_nulls && values.null_count() > 0) ||
172 (values.length() - values.null_count() < options.min_count)) {
173 RETURN_NOT_OK(PrepareOutput<T>(/*n=*/0, ctx, *out->type(), &result));
174 } else {
175 CountValues<CType>(values, this->min, this->counts.data());
176 RETURN_NOT_OK(GetResult(ctx, *out->type(), &result));
177 }
178 *out = result.array_data();
179 return Status::OK();
180 }
181};
182
183// booleans can be handled more straightforward

Callers

nothing calls this directly

Calls 8

chunked_arrayMethod · 0.80
array_dataMethod · 0.80
GetFunction · 0.50
OKFunction · 0.50
null_countMethod · 0.45
lengthMethod · 0.45
typeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected