| 412 | virtual Status Finish() = 0; |
| 413 | |
| 414 | Status ExecTake() { |
| 415 | RETURN_NOT_OK(this->validity_builder.Reserve(output_length)); |
| 416 | RETURN_NOT_OK(Init()); |
| 417 | int index_width = this->selection.type->byte_width(); |
| 418 | |
| 419 | // CTRP dispatch here |
| 420 | switch (index_width) { |
| 421 | case 1: { |
| 422 | Status s = |
| 423 | static_cast<Impl*>(this)->template GenerateOutput<TakeAdapter<uint8_t>>(); |
| 424 | RETURN_NOT_OK(s); |
| 425 | } break; |
| 426 | case 2: { |
| 427 | Status s = |
| 428 | static_cast<Impl*>(this)->template GenerateOutput<TakeAdapter<uint16_t>>(); |
| 429 | RETURN_NOT_OK(s); |
| 430 | } break; |
| 431 | case 4: { |
| 432 | Status s = |
| 433 | static_cast<Impl*>(this)->template GenerateOutput<TakeAdapter<uint32_t>>(); |
| 434 | RETURN_NOT_OK(s); |
| 435 | } break; |
| 436 | case 8: { |
| 437 | Status s = |
| 438 | static_cast<Impl*>(this)->template GenerateOutput<TakeAdapter<uint64_t>>(); |
| 439 | RETURN_NOT_OK(s); |
| 440 | } break; |
| 441 | default: |
| 442 | DCHECK(false) << "Invalid index width"; |
| 443 | break; |
| 444 | } |
| 445 | RETURN_NOT_OK(this->FinishCommon()); |
| 446 | return Finish(); |
| 447 | } |
| 448 | |
| 449 | Status ExecFilter() { |
| 450 | RETURN_NOT_OK(this->validity_builder.Reserve(output_length)); |
no test coverage detected