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

Function AddQuantileKernels

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

Source from the content-addressed store, hash-verified

523}
524
525void AddQuantileKernels(VectorFunction* func) {
526 VectorKernel base;
527 base.init = QuantileState::Init;
528 base.can_execute_chunkwise = false;
529 base.output_chunked = false;
530
531 for (const auto& ty : NumericTypes()) {
532 base.signature = KernelSignature::Make({InputType(ty)}, OutputType(ResolveOutput));
533 // output type is determined at runtime, set template argument to nulltype
534 base.exec = GenerateNumeric<QuantileExecutor, NullType>(*ty);
535 base.exec_chunked = GenerateNumeric<QuantileExecutorChunked, NullType>(*ty);
536 DCHECK_OK(func->AddKernel(base));
537 }
538 for (auto type_id : DecimalTypeIds()) {
539 base.signature = KernelSignature::Make({type_id}, OutputType(ResolveOutput));
540 base.exec = GenerateDecimal<QuantileExecutor, NullType>(type_id);
541 base.exec_chunked = GenerateDecimal<QuantileExecutorChunked, NullType>(type_id);
542 DCHECK_OK(func->AddKernel(base));
543 }
544}
545
546const FunctionDoc quantile_doc{
547 "Compute an array of quantiles of a numeric array or chunked array",

Callers 1

Calls 4

InputTypeFunction · 0.85
OutputTypeFunction · 0.85
MakeFunction · 0.50
AddKernelMethod · 0.45

Tested by

no test coverage detected