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


##########
parquet/src/encodings/rle.rs:
##########
@@ -321,14 +321,15 @@ 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();
+        self.reload()?;

Review Comment:
   The old code ignored the result...the new code ignores the result less 
obviously and then returns `Ok(())`. I was wondering if it would make more 
sense to test the result and error when `false`, but that would be a behavior 
change. I'm not familiar enough with this code to suggest doing that. Maybe 
just leave a comment here that the result is deliberately ignored. 
Justification for doing so would be the icing on the cake. 😄 



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