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

Method Exec

cpp/src/arrow/compute/kernels/vector_statistics.cc:64–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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);

Callers

nothing calls this directly

Calls 7

ClipValuesFunction · 0.85
ToArrayDataMethod · 0.80
ValidateOptionsFunction · 0.70
GetFunction · 0.50
OKFunction · 0.50
loadMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected