| 554 | }; |
| 555 | |
| 556 | Status ArraySortIndicesChunked(KernelContext* ctx, const ExecBatch& batch, Datum* out) { |
| 557 | const auto& options = ArraySortIndicesState::Get(ctx); |
| 558 | ArrayData* out_arr = out->mutable_array(); |
| 559 | DCHECK_EQ(out_arr->length, batch.length); |
| 560 | uint64_t* out_begin = out_arr->GetMutableValues<uint64_t>(1); |
| 561 | uint64_t* out_end = out_begin + out_arr->length; |
| 562 | std::iota(out_begin, out_end, 0); |
| 563 | return SortChunkedArray(ctx->exec_context(), out_begin, out_end, |
| 564 | *batch[0].chunked_array(), options.order, |
| 565 | options.null_placement) |
| 566 | .status(); |
| 567 | } |
| 568 | |
| 569 | template <template <typename...> class ExecTemplate> |
| 570 | void AddArraySortingKernels(VectorKernel base, VectorFunction* func) { |
nothing calls this directly
no test coverage detected