| 1374 | |
| 1375 | template <typename I> |
| 1376 | bool IndexInRange(I idx, int32_t dictionary_length) { |
| 1377 | ARROW_DCHECK_GT(dictionary_length, 0); |
| 1378 | using T = std::common_type_t<decltype(idx), decltype(dictionary_length)>; |
| 1379 | return idx >= 0 && static_cast<T>(idx) < static_cast<T>(dictionary_length); |
| 1380 | } |
| 1381 | |
| 1382 | // Converter for GetSpaced that handles runs of returned dictionary |
| 1383 | // indices. |