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