| 52 | |
| 53 | template <typename Impl> |
| 54 | Result<std::unique_ptr<KernelState>> HashAggregateInit(KernelContext* ctx, |
| 55 | const KernelInitArgs& args) { |
| 56 | auto impl = std::make_unique<Impl>(); |
| 57 | RETURN_NOT_OK(impl->Init(ctx->exec_context(), args)); |
| 58 | // R build with openSUSE155 requires an explicit unique_ptr construction |
| 59 | return std::unique_ptr<KernelState>(std::move(impl)); |
| 60 | } |
| 61 | |
| 62 | inline Status HashAggregateResize(KernelContext* ctx, int64_t num_groups) { |
| 63 | return checked_cast<GroupedAggregator*>(ctx->state())->Resize(num_groups); |
nothing calls this directly
no test coverage detected