| 637 | } |
| 638 | |
| 639 | Status ValueCountsFinalize(KernelContext* ctx, std::vector<Datum>* out) { |
| 640 | auto hash_impl = checked_cast<HashKernel*>(ctx->state()); |
| 641 | std::shared_ptr<ArrayData> uniques; |
| 642 | |
| 643 | RETURN_NOT_OK(hash_impl->GetDictionary(&uniques)); |
| 644 | |
| 645 | ExecResult result; |
| 646 | RETURN_NOT_OK(hash_impl->FlushFinal(&result)); |
| 647 | *out = {Datum(BoxValueCounts(uniques, result.array_data()))}; |
| 648 | return Status::OK(); |
| 649 | } |
| 650 | |
| 651 | // Return the dictionary from the hash kernel or allocate an empty one. |
| 652 | // Required because on empty inputs, we don't ever see the input and |
nothing calls this directly
no test coverage detected