| 275 | |
| 276 | template <typename ValueType> |
| 277 | static Status Exec(KernelContext* ctx, const ExecSpan& span, ExecResult* result) { |
| 278 | auto state = checked_cast<const RunEndEncodingState*>(ctx->state()); |
| 279 | switch (state->run_end_type->id()) { |
| 280 | case Type::INT16: |
| 281 | return DoExec<Int16Type, ValueType>(ctx, span, result); |
| 282 | case Type::INT32: |
| 283 | return DoExec<Int32Type, ValueType>(ctx, span, result); |
| 284 | case Type::INT64: |
| 285 | return DoExec<Int64Type, ValueType>(ctx, span, result); |
| 286 | default: |
| 287 | break; |
| 288 | } |
| 289 | return Status::Invalid("Invalid run end type: ", *state->run_end_type); |
| 290 | } |
| 291 | |
| 292 | /// \brief The OutputType::Resolver of the "run_end_decode" function. |
| 293 | static Result<TypeHolder> ResolveOutputType( |