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

Function RegisterVectorArraySort

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

Source from the content-addressed store, hash-verified

651}
652
653void RegisterVectorArraySort(FunctionRegistry* registry) {
654 // The kernel outputs into preallocated memory and is never null
655 VectorKernel base;
656 base.mem_allocation = MemAllocation::PREALLOCATE;
657 base.null_handling = NullHandling::OUTPUT_NOT_NULL;
658 base.can_execute_chunkwise = false;
659
660 auto array_sort_indices = std::make_shared<VectorFunction>(
661 "array_sort_indices", Arity::Unary(), array_sort_indices_doc,
662 GetDefaultArraySortOptions());
663 base.init = ArraySortIndicesState::Init;
664 base.exec_chunked = ArraySortIndicesChunked;
665 AddArraySortingKernels<ArraySortIndices>(base, array_sort_indices.get());
666 AddDictArraySortingKernels<ArraySortIndices>(base, array_sort_indices.get());
667 AddStructArraySortingKernels<ArraySortIndices>(base, array_sort_indices.get());
668 DCHECK_OK(registry->AddFunction(std::move(array_sort_indices)));
669
670 // partition_nth_indices has a parameter so needs its init function
671 auto part_indices = std::make_shared<VectorFunction>(
672 "partition_nth_indices", Arity::Unary(), partition_nth_indices_doc);
673 base.init = PartitionNthToIndicesState::Init;
674 AddArraySortingKernels<PartitionNthToIndices>(base, part_indices.get());
675 DCHECK_OK(registry->AddFunction(std::move(part_indices)));
676}
677
678} // namespace internal
679} // namespace compute

Callers 1

RegisterComputeKernelsFunction · 0.85

Calls 4

UnaryFunction · 0.85
getMethod · 0.45
AddFunctionMethod · 0.45

Tested by

no test coverage detected