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

Method Exec

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

Source from the content-addressed store, hash-verified

151 }
152
153 Status Exec(KernelContext* ctx, const ExecSpan& batch, ExecResult* out) {
154 // count values in all chunks, ignore nulls
155 const ArraySpan& values = batch[0].array;
156 const ModeOptions& options = ModeState::Get(ctx);
157 if ((!options.skip_nulls && values.GetNullCount() > 0) ||
158 (values.length - values.GetNullCount() < options.min_count)) {
159 return PrepareOutput<T>(/*n=*/0, ctx, *out->type(), out).status();
160 }
161
162 CountValues<CType>(values, this->min, this->counts.data());
163 return GetResult(ctx, *out->type(), out);
164 }
165
166 Status ExecChunked(KernelContext* ctx, const ExecBatch& batch, Datum* out) {
167 // count values in all chunks, ignore nulls

Callers

nothing calls this directly

Calls 5

GetNullCountMethod · 0.80
GetFunction · 0.50
statusMethod · 0.45
typeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected