| 490 | // MinMax implementation |
| 491 | |
| 492 | Result<std::unique_ptr<KernelState>> MinMaxInitDefault(KernelContext* ctx, |
| 493 | const KernelInitArgs& args) { |
| 494 | ARROW_ASSIGN_OR_RAISE(TypeHolder out_type, |
| 495 | args.kernel->signature->out_type().Resolve(ctx, args.inputs)); |
| 496 | MinMaxInitState<SimdLevel::NONE> visitor( |
| 497 | ctx, *args.inputs[0], out_type.GetSharedPtr(), |
| 498 | static_cast<const ScalarAggregateOptions&>(*args.options)); |
| 499 | return visitor.Create(); |
| 500 | } |
| 501 | |
| 502 | // For "min" and "max" functions: override finalize and return the actual value |
| 503 | template <MinOrMax min_or_max> |