jecsand838 commented on code in PR #8759:
URL: https://github.com/apache/arrow-rs/pull/8759#discussion_r2719638728
##########
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:
@nathaniel-d-ef This doesn't seem to be fully addressed imo. Several
`write_all(...)` failures are still converted to
`AvroError::General(format!(...))`, which drops the `io::Error` source
entirely, recreating the original concern. This shows up specifically in
`write_sign_extended` (padding writes) and `write_optional_index`.
--
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]