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

Function CheckQuantileOptions

cpp/src/arrow/compute/kernels/aggregate_quantile.cc:482–497  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

480};
481
482Status CheckQuantileOptions(KernelContext* ctx) {
483 if (ctx->state() == nullptr) {
484 return Status::Invalid("Quantile requires QuantileOptions");
485 }
486
487 const QuantileOptions& options = QuantileState::Get(ctx);
488 if (options.q.empty()) {
489 return Status::Invalid("Requires quantile argument");
490 }
491 for (double q : options.q) {
492 if (q < 0 || q > 1) {
493 return Status::Invalid("Quantile must be between 0 and 1");
494 }
495 }
496 return Status::OK();
497}
498
499template <typename OutputTypeUnused, typename InType>
500struct QuantileExecutor {

Callers 2

ExecMethod · 0.85
ExecMethod · 0.85

Calls 5

InvalidFunction · 0.50
GetFunction · 0.50
OKFunction · 0.50
stateMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected