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

Method Exec

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

Source from the content-addressed store, hash-verified

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