corasaurus-hex commented on code in PR #18457:
URL: https://github.com/apache/datafusion/pull/18457#discussion_r2501503994
##########
datafusion/datasource-arrow/src/file_format.rs:
##########
@@ -427,7 +493,8 @@ async fn collect_at_least_n_bytes(
if buf.len() < n {
return Err(ArrowError::ParseError(
"Unexpected end of byte stream for Arrow IPC file".to_string(),
- ))?;
+ )
+ .into());
Review Comment:
`return Err(...)?` is redundant, you really only need either a bare
`Err(...)?` or a `return Err(...)`, but a bare `Err(...)?` looks funny and we
need to convert the `ArrowError` into a `DatafusionError` (which `?` does for
us automatically) and so we end up with `return Err(...).into()`
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]