alamb commented on code in PR #10254:
URL: https://github.com/apache/arrow-rs/pull/10254#discussion_r3509115854


##########
arrow-array/src/array/byte_array.rs:
##########
@@ -135,15 +135,15 @@ impl<T: ByteArrayType> GenericByteArray<T> {
         // Verify that each pair of offsets is a valid slices of values
         T::validate(&offsets, &values)?;
 
-        if let Some(n) = nulls.as_ref() {
-            if n.len() != len {
-                return Err(ArrowError::InvalidArgumentError(format!(
-                    "Incorrect length of null buffer for {}{}Array, expected 
{len} got {}",
-                    T::Offset::PREFIX,
-                    T::PREFIX,
-                    n.len(),
-                )));
-            }
+        if let Some(n) = nulls.as_ref()

Review Comment:
   Updating MSRV requires updating clippy as well



##########
Cargo.toml:
##########
@@ -82,7 +82,7 @@ include = [
     "NOTICE.txt",
 ]
 edition = "2024"
-rust-version = "1.85"
+rust-version = "1.88"

Review Comment:
   This is the main change of this PR



##########
parquet/src/arrow/buffer/offset_buffer.rs:
##########
@@ -62,15 +62,13 @@ impl<I: OffsetSizeTrait> OffsetBuffer<I> {
     /// UTF-8. This should be done by calling [`Self::check_valid_utf8`] after
     /// all data has been written
     pub fn try_push(&mut self, data: &[u8], validate_utf8: bool) -> Result<()> 
{
-        if validate_utf8 {
-            if let Some(&b) = data.first() {
-                // A valid code-point iff it does not start with 0b10xxxxxx
-                // Bit-magic taken from `std::str::is_char_boundary`
-                if (b as i8) < -0x40 {
-                    return Err(ParquetError::General(
-                        "encountered non UTF-8 data".to_string(),
-                    ));
-                }
+        if validate_utf8 && let Some(&b) = data.first() {

Review Comment:
   this is all basically driven by the introduction of let chains



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