| 174 | }; |
| 175 | |
| 176 | Result<std::unique_ptr<PivotWiderKeyMapper>> PivotWiderKeyMapper::Make( |
| 177 | const DataType& key_type, const PivotWiderOptions* options, ExecContext* ctx) { |
| 178 | auto instance = std::make_unique<ConcretePivotWiderKeyMapper>(); |
| 179 | RETURN_NOT_OK(instance->Init(key_type, options, ctx)); |
| 180 | // We can remove this static_cast() once we drop support for g++ |
| 181 | // 7.5.0 (we require C++20). |
| 182 | return static_cast<std::unique_ptr<PivotWiderKeyMapper>>(std::move(instance)); |
| 183 | } |
| 184 | |
| 185 | } // namespace arrow::compute::internal |