nathaniel-d-ef commented on code in PR #8759:
URL: https://github.com/apache/arrow-rs/pull/8759#discussion_r2487091847


##########
arrow-avro/src/writer/encoder.rs:
##########
@@ -155,13 +149,12 @@ fn write_sign_extended<W: Write + ?Sized>(
         if src_be[..extra].iter().any(|&b| b != sign_byte)
             || ((src_be[extra] ^ sign_byte) & 0x80) != 0
         {
-            return Err(ArrowError::InvalidArgumentError(format!(
+            return Err(AvroError::InvalidArgument(format!(
                 "Decimal value with {len} bytes cannot be represented in {n} 
bytes without overflow",
             )));
         }
-        return out
-            .write_all(&src_be[extra..])
-            .map_err(|e| ArrowError::IoError(format!("write decimal fixed: 
{e}"), e));

Review Comment:
   Yes, that's a good point. I adjusted this to use the General error and pass 
the contextual info. 



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