HippoBaro commented on code in PR #9653:
URL: https://github.com/apache/arrow-rs/pull/9653#discussion_r3054225413


##########
parquet/src/encodings/rle.rs:
##########
@@ -122,6 +122,27 @@ impl RleEncoder {
         bit_packed_max_size.max(rle_max_size)
     }
 
+    /// Returns `true` if the encoder is currently in RLE accumulation mode
+    /// for the given value (i.e., `repeat_count > 8` and `current_value == 
value`).
+    ///
+    /// When this returns `true`, callers may use 
[`extend_run`](Self::extend_run)
+    /// to add more repetitions without per-element overhead.
+    #[inline]
+    pub fn is_accumulating(&self, value: u64) -> bool {
+        self.repeat_count > 8 && self.current_value == value

Review Comment:
   Thank you for pushing back. You are absolutely right. `>` was correct but 
spurious. `>=` is exactly right. It's fixed in the latest version, and I added 
a unit test for good measure. 



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