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

Method Exec

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

Source from the content-addressed store, hash-verified

526 using ArrayType = typename TypeTraits<InType>::ArrayType;
527
528 static Status Exec(KernelContext* ctx, const ExecSpan& batch, ExecResult* out) {
529 const auto& options = ArraySortIndicesState::Get(ctx);
530 ArrayData* out_arr = out->array_data().get();
531 std::span<uint64_t> out_span{out_arr->GetMutableValues<uint64_t>(1),
532 static_cast<size_t>(out_arr->length)};
533 std::iota(out_span.begin(), out_span.end(), 0);
534
535 ArrayType arr(batch[0].array.ToArrayData());
536 ARROW_ASSIGN_OR_RAISE(auto sorter, GetArraySorter(*GetPhysicalType(arr.type())));
537
538 return sorter(out_span, arr, 0, options, ctx->exec_context()).status();
539 }
540};
541
542Status ArraySortIndicesChunked(KernelContext* ctx, const ExecBatch& batch, Datum* out) {

Callers

nothing calls this directly

Calls 8

array_dataMethod · 0.80
ToArrayDataMethod · 0.80
exec_contextMethod · 0.80
GetFunction · 0.50
getMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
statusMethod · 0.45

Tested by

no test coverage detected