| 367 | } |
| 368 | |
| 369 | Status Finalize(KernelContext*, Datum* out) override { |
| 370 | if ((!options.skip_nulls && this->nulls_observed) || |
| 371 | (this->count < options.min_count)) { |
| 372 | out->value = std::make_shared<OutputType>(this->out_type); |
| 373 | } else { |
| 374 | out->value = std::make_shared<OutputType>(this->product, this->out_type); |
| 375 | } |
| 376 | return Status::OK(); |
| 377 | } |
| 378 | |
| 379 | std::shared_ptr<DataType> out_type; |
| 380 | ScalarAggregateOptions options; |