etseidl commented on code in PR #8729:
URL: https://github.com/apache/arrow-rs/pull/8729#discussion_r2476016648


##########
parquet/src/encodings/rle.rs:
##########
@@ -321,14 +321,18 @@ impl RleDecoder {
     }
 
     #[inline]
-    pub fn set_data(&mut self, data: Bytes) {
+    pub fn set_data(&mut self, data: Bytes) -> Result<()> {
         if let Some(ref mut bit_reader) = self.bit_reader {
             bit_reader.reset(data);
         } else {
             self.bit_reader = Some(BitReader::new(data));
         }
 
-        let _ = self.reload();
+        // Initialize decoder state. The boolean only reports whether the 
first run contained data,
+        // and `get`/`get_batch` already interpret that result to drive 
iteration. We only need
+        // errors propagated here, so the flag returned is intentionally 
ignored.

Review Comment:
   ❤️❤️❤️❤️❤️



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