| 616 | } |
| 617 | |
| 618 | Status DictEncodeFinalize(KernelContext* ctx, std::vector<Datum>* out) { |
| 619 | auto hash_impl = checked_cast<HashKernel*>(ctx->state()); |
| 620 | std::shared_ptr<ArrayData> uniques; |
| 621 | RETURN_NOT_OK(hash_impl->GetDictionary(&uniques)); |
| 622 | auto dict_type = dictionary(int32(), uniques->type); |
| 623 | auto dict = MakeArray(uniques); |
| 624 | for (size_t i = 0; i < out->size(); ++i) { |
| 625 | (*out)[i] = |
| 626 | std::make_shared<DictionaryArray>(dict_type, (*out)[i].make_array(), dict); |
| 627 | } |
| 628 | return Status::OK(); |
| 629 | } |
| 630 | |
| 631 | std::shared_ptr<ArrayData> BoxValueCounts(const std::shared_ptr<ArrayData>& uniques, |
| 632 | const std::shared_ptr<ArrayData>& counts) { |
nothing calls this directly
no test coverage detected