Get a batch of values return the number of decoded elements. May write fewer elements to the output than requested if there are not enough values left.
| 330 | /// May write fewer elements to the output than requested if there are not enough values |
| 331 | /// left. |
| 332 | [[nodiscard]] rle_size_t GetBatch(value_type* out, rle_size_t batch_size, |
| 333 | rle_size_t value_bit_width) { |
| 334 | if (ARROW_PREDICT_FALSE(remaining_count_ == 0)) { |
| 335 | return 0; |
| 336 | } |
| 337 | |
| 338 | const auto to_read = std::min(remaining_count_, batch_size); |
| 339 | std::fill(out, out + to_read, value_); |
| 340 | remaining_count_ -= to_read; |
| 341 | return to_read; |
| 342 | } |
| 343 | |
| 344 | private: |
| 345 | value_type value_ = {}; |
nothing calls this directly
no outgoing calls
no test coverage detected