mapleFU commented on code in PR #41037:
URL: https://github.com/apache/arrow/pull/41037#discussion_r1555837060


##########
cpp/src/parquet/encoding.cc:
##########
@@ -3177,7 +3179,9 @@ class RleBooleanDecoder : public DecoderImpl, virtual 
public BooleanDecoder {
         PARQUET_THROW_NOT_OK(
             out->AppendValues(values.begin(), values.begin() + 
current_batch_size));
         num_values -= current_batch_size;
-        current_index_in_batch = 0;
+        // set current_index_in_batch to current_batch_size means
+        // the whole batch is totally consumed.
+        current_index_in_batch = current_batch_size;

Review Comment:
   It's only useful in per-value next when `null_count != 0`. 
`next_boolean_batch` will check all values in this batch is consumed (.i.e 
current_index_in_batch == batch_size). When `null_count != 0`, it's useless 
actually, but it uses `next_boolean_batch` here.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to