| 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 |
nothing calls this directly
no test coverage detected