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


##########
cpp/src/parquet/encoding.cc:
##########
@@ -2479,7 +2481,12 @@ class DeltaBitPackDecoder : public DecoderImpl, virtual 
public TypedDecoder<DTyp
       if (ARROW_PREDICT_FALSE(values_current_mini_block_ == 0)) {
         if (ARROW_PREDICT_FALSE(!block_initialized_)) {
           buffer[i++] = last_value_;
-          if (ARROW_PREDICT_FALSE(i == max_values)) break;
+          if (ARROW_PREDICT_FALSE(i == max_values)) {
+            if (i != static_cast<int>(total_value_count_)) {
+              InitBlock();
+            }
+            break;
+          }

Review Comment:
   To be honest, the logic is a bit trickey here, I will try to explain it. I'm 
bad in English, so maybe you can edit it directly if you can explain it better.



-- 
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