@@ -98,24 +98,24 @@ class RleRunToBitmapDecoder {
9898 // / Return how much the decoder would advance if asked to.
9999 // /
100100 // / Does not modify input.
101- rle_size_t AdvanceCapacity (rle_size_t batch_size) const noexcept {
101+ rle_size_t GetAdvanceCapacity (rle_size_t batch_size) const noexcept {
102102 const auto n_vals = std::min (batch_size, remaining ());
103103 return n_vals;
104104 }
105105
106106 // / Advance by as many values as provided or until exhaustion of the decoder.
107107 // / Return the number of values skipped.
108108 [[nodiscard]] rle_size_t Advance (rle_size_t batch_size) {
109- const auto n_vals = AdvanceCapacity (batch_size);
109+ const auto n_vals = GetAdvanceCapacity (batch_size);
110110 values_left_ -= n_vals;
111111 ARROW_DCHECK_GE (remaining (), 0 );
112112 return n_vals;
113113 }
114114
115- // / Get the next value and return false if there are no more.
115+ // / Read the next value into `out` and return false if there are no more.
116116 [[nodiscard]] bool Get (BitmapSpanMut out) { return GetBatch (out, 1 ) == 1 ; }
117117
118- // / Get a batch of values return the number of decoded elements.
118+ // / Get a batch of values into `out` and return the number of decoded elements.
119119 // /
120120 // / May write fewer elements to the output than requested if there are not
121121 // / enough values left.
@@ -140,7 +140,7 @@ class RleRunToBitmapDecoder {
140140
141141 // TRAILER: Writing inside the last byte if caller asked for non multiple of 8 values
142142 const auto n_last_vals = std::min (batch_size - n_vals, remaining ());
143- if (ARROW_PREDICT_FALSE ( n_last_vals > 0 ) ) {
143+ if (n_last_vals > 0 ) {
144144 ARROW_DCHECK_LT (n_last_vals, 8 );
145145 n_vals += GetBatchInByte (out.NewStartingAt (n_vals), n_last_vals);
146146 }
@@ -215,15 +215,15 @@ class BitPackedRunToBitmapDecoder {
215215 // / Return how much the decoder would advance if asked to.
216216 // /
217217 // / Does not modify input.
218- rle_size_t AdvanceCapacity (rle_size_t batch_size) const noexcept {
218+ rle_size_t GetAdvanceCapacity (rle_size_t batch_size) const noexcept {
219219 const auto n_vals = std::min (batch_size, remaining ());
220220 return n_vals;
221221 }
222222
223223 // / Advance by as many values as provided or until exhaustion of the decoder.
224224 // / Return the number of values skipped.
225225 [[nodiscard]] rle_size_t Advance (rle_size_t batch_size) {
226- const auto n_vals = AdvanceCapacity (batch_size);
226+ const auto n_vals = GetAdvanceCapacity (batch_size);
227227 values_read_ += n_vals;
228228 ARROW_DCHECK_GE (remaining (), 0 );
229229 return n_vals;
@@ -236,7 +236,7 @@ class BitPackedRunToBitmapDecoder {
236236 // / May write fewer elements to the output than requested if there are not enough values
237237 // / left.
238238 [[nodiscard]] rle_size_t GetBatch (BitmapSpanMut out, rle_size_t batch_size) {
239- auto n_vals = AdvanceCapacity (batch_size);
239+ auto n_vals = GetAdvanceCapacity (batch_size);
240240 arrow::internal::CopyBitmap (unread_values_ptr (), unread_values_bit_offset (), n_vals,
241241 out.data (), out.bit_start ());
242242 return Advance (n_vals);
0 commit comments