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


##########
parquet/src/encodings/rle.rs:
##########
@@ -459,7 +469,10 @@ impl RleDecoder {
                 self.rle_left -= num_values as u32;
                 values_read += num_values;
             } else if self.bit_packed_left > 0 {
-                let bit_reader = self.bit_reader.as_mut().expect("bit_reader 
should be set");
+                let bit_reader = self
+                    .bit_reader
+                    .as_mut()
+                    .ok_or_else(|| general_err!("bit_reader should be set"))?;

Review Comment:
   Agree, but I'd like to keep this one for consistency as we already have a 
lot `ok_or_else` in this file



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