martin-g commented on code in PR #8759:
URL: https://github.com/apache/arrow-rs/pull/8759#discussion_r2510726010
##########
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:
I don't think this addresses @alamb's concerns. Now `e` is string-ified and
it losses the `io::Error` source. AFAIS only ::External and ::ArrowError
preserve the source/cause
(https://github.com/elastiflow/arrow-rs/blob/b40bb9c6b70ecefee8647e0c3dd9be77bc6ca2bf/arrow-avro/src/errors.rs#L54)
--
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]