| 62 | using CType = typename TypeTraits<Type>::CType; |
| 63 | |
| 64 | static Status Exec(KernelContext* ctx, const ExecSpan& batch, ExecResult* out) { |
| 65 | const auto& options = WinsorizeState::Get(ctx); |
| 66 | RETURN_NOT_OK(ValidateOptions(options)); |
| 67 | auto data = batch.values[0].array.ToArrayData(); |
| 68 | ARROW_ASSIGN_OR_RAISE(auto maybe_quantiles, GetQuantileValues(ctx, data, options)); |
| 69 | auto out_data = out->array_data_mutable(); |
| 70 | if (!maybe_quantiles.has_value()) { |
| 71 | // Only nulls and NaNs => return input as-is |
| 72 | out_data->null_count = data->null_count.load(); |
| 73 | out_data->length = data->length; |
| 74 | out_data->buffers = data->buffers; |
| 75 | return Status::OK(); |
| 76 | } |
| 77 | return ClipValues(*data, maybe_quantiles.value(), out_data, ctx); |
| 78 | } |
| 79 | |
| 80 | static Status ExecChunked(KernelContext* ctx, const ExecBatch& batch, Datum* out) { |
| 81 | const auto& options = WinsorizeState::Get(ctx); |
nothing calls this directly
no test coverage detected