| 1314 | template <typename T> |
| 1315 | template <typename V> |
| 1316 | auto RleBitPackedDecoder<T>::GetBatchWithDictSpaced( |
| 1317 | const V* dictionary, int32_t dictionary_length, V* out, rle_size_t batch_size, |
| 1318 | rle_size_t null_count, const uint8_t* valid_bits, |
| 1319 | int64_t valid_bits_offset) -> rle_size_t { |
| 1320 | if (null_count == 0) { |
| 1321 | return GetBatchWithDict<V>(dictionary, dictionary_length, out, batch_size); |
| 1322 | } |
| 1323 | if (null_count == batch_size) { |
| 1324 | // All nulls, avoid instantiating DictionaryConverter as dictionary_length |
| 1325 | // could be 0. |
| 1326 | std::fill(out, out + batch_size, V{}); |
| 1327 | return batch_size; |
| 1328 | } |
| 1329 | if (ARROW_PREDICT_FALSE(batch_size <= 0 || dictionary_length == 0)) { |
| 1330 | // Either empty batch or invalid dictionary |
| 1331 | return 0; |
| 1332 | } |
| 1333 | |
| 1334 | internal::DictionaryConverter<V, value_type> converter{dictionary, dictionary_length}; |
| 1335 | |
| 1336 | return GetSpaced(converter, out, batch_size, valid_bits, valid_bits_offset, null_count); |
| 1337 | } |
| 1338 | |
| 1339 | /************************* |
| 1340 | * RleBitPackedEncoder * |
no outgoing calls