| 492 | // Copy values starting from index `start` into `out_data` |
| 493 | template <typename Value> |
| 494 | void CopyValues(int32_t start, Value* out_data) const { |
| 495 | // So that both uint16_t and Float16 are allowed |
| 496 | static_assert(sizeof(Value) == sizeof(Scalar)); |
| 497 | Scalar* out = reinterpret_cast<Scalar*>(out_data); |
| 498 | ARROW_DCHECK_OK(hash_table_.VisitEntries([=](const HashTableEntry* entry) { |
| 499 | int32_t index = entry->payload.memo_index - start; |
| 500 | if (index >= 0) { |
| 501 | out[index] = entry->payload.value; |
| 502 | } |
| 503 | return Status::OK(); |
| 504 | })); |
| 505 | // Zero-initialize the null entry |
| 506 | if (null_index_ != kKeyNotFound) { |
| 507 | int32_t index = null_index_ - start; |
| 508 | if (index >= 0) { |
| 509 | out[index] = Scalar{}; |
| 510 | } |
| 511 | } |
| 512 | } |
| 513 | |
| 514 | template <typename Value> |
| 515 | void CopyValues(Value* out_data) const { |