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

Function AddArraySortingKernels

cpp/src/arrow/compute/kernels/vector_array_sort.cc:555–596  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

553
554template <template <typename...> class ExecTemplate>
555void AddArraySortingKernels(VectorKernel base, VectorFunction* func) {
556 // null type
557 base.signature = KernelSignature::Make({null()}, uint64());
558 base.exec = ExecTemplate<UInt64Type, NullType>::Exec;
559 DCHECK_OK(func->AddKernel(base));
560
561 // bool type
562 base.signature = KernelSignature::Make({boolean()}, uint64());
563 base.exec = ExecTemplate<UInt64Type, BooleanType>::Exec;
564 DCHECK_OK(func->AddKernel(base));
565
566 // duration type
567 base.signature = KernelSignature::Make({Type::DURATION}, uint64());
568 base.exec = GenerateNumeric<ExecTemplate, UInt64Type>(*int64());
569 DCHECK_OK(func->AddKernel(base));
570
571 for (const auto& ty : NumericTypes()) {
572 auto physical_type = GetPhysicalType(ty);
573 base.signature = KernelSignature::Make({ty}, uint64());
574 base.exec = GenerateNumeric<ExecTemplate, UInt64Type>(*physical_type);
575 DCHECK_OK(func->AddKernel(base));
576 }
577 for (const auto& ty : TemporalTypes()) {
578 auto physical_type = GetPhysicalType(ty);
579 base.signature = KernelSignature::Make({ty->id()}, uint64());
580 base.exec = GenerateNumeric<ExecTemplate, UInt64Type>(*physical_type);
581 DCHECK_OK(func->AddKernel(base));
582 }
583 for (const auto id : {Type::DECIMAL128, Type::DECIMAL256}) {
584 base.signature = KernelSignature::Make({id}, uint64());
585 base.exec = GenerateDecimal<ExecTemplate, UInt64Type>(id);
586 DCHECK_OK(func->AddKernel(base));
587 }
588 for (const auto& ty : BaseBinaryTypes()) {
589 base.signature = KernelSignature::Make({ty}, uint64());
590 base.exec = GenerateVarBinaryBase<ExecTemplate, UInt64Type>(ty);
591 DCHECK_OK(func->AddKernel(base));
592 }
593 base.signature = KernelSignature::Make({Type::FIXED_SIZE_BINARY}, uint64());
594 base.exec = ExecTemplate<UInt64Type, FixedSizeBinaryType>::Exec;
595 DCHECK_OK(func->AddKernel(base));
596}
597
598template <template <typename...> class ExecTemplate>
599void AddDictArraySortingKernels(VectorKernel base, VectorFunction* func) {

Callers

nothing calls this directly

Calls 4

GetPhysicalTypeFunction · 0.85
MakeFunction · 0.50
AddKernelMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected