| 522 | |
| 523 | template <typename ValueType> |
| 524 | static Status Exec(KernelContext* ctx, const ExecSpan& span, ExecResult* result) { |
| 525 | const auto& ree_type = checked_cast<const RunEndEncodedType*>(span.values[0].type()); |
| 526 | switch (ree_type->run_end_type()->id()) { |
| 527 | case Type::INT16: |
| 528 | return DoExec<Int16Type, ValueType>(ctx, span, result); |
| 529 | case Type::INT32: |
| 530 | return DoExec<Int32Type, ValueType>(ctx, span, result); |
| 531 | case Type::INT64: |
| 532 | return DoExec<Int64Type, ValueType>(ctx, span, result); |
| 533 | default: |
| 534 | break; |
| 535 | } |
| 536 | return Status::Invalid("Invalid run end type: ", *ree_type->run_end_type()); |
| 537 | } |
| 538 | |
| 539 | template <typename RunEndType> |
| 540 | static Status DoExecNested(KernelContext* ctx, const ArraySpan& input_array, |