| 540 | }; |
| 541 | |
| 542 | Status ArraySortIndicesChunked(KernelContext* ctx, const ExecBatch& batch, Datum* out) { |
| 543 | const auto& options = ArraySortIndicesState::Get(ctx); |
| 544 | ArrayData* out_arr = out->mutable_array(); |
| 545 | DCHECK_EQ(out_arr->length, batch.length); |
| 546 | std::span<uint64_t> out_span{out_arr->GetMutableValues<uint64_t>(1), |
| 547 | static_cast<size_t>(out_arr->length)}; |
| 548 | std::iota(out_span.begin(), out_span.end(), 0); |
| 549 | return SortChunkedArray(ctx->exec_context(), out_span, *batch[0].chunked_array(), |
| 550 | options.order, options.null_placement) |
| 551 | .status(); |
| 552 | } |
| 553 | |
| 554 | template <template <typename...> class ExecTemplate> |
| 555 | void AddArraySortingKernels(VectorKernel base, VectorFunction* func) { |
nothing calls this directly
no test coverage detected