suremarc commented on code in PR #4797:
URL: https://github.com/apache/arrow-rs/pull/4797#discussion_r1319119480
##########
arrow-flight/src/sql/client.rs:
##########
@@ -515,6 +552,17 @@ fn status_to_arrow_error(status: tonic::Status) ->
ArrowError {
ArrowError::IpcError(format!("{status:?}"))
}
+fn flight_error_to_arrow_error(err: FlightError) -> ArrowError {
+ match err {
+ FlightError::Arrow(e) => e,
+ FlightError::NotYetImplemented(s) => ArrowError::NotYetImplemented(s),
+ FlightError::Tonic(status) => status_to_arrow_error(status),
+ FlightError::ProtocolError(e) => ArrowError::IpcError(e),
+ FlightError::DecodeError(s) => ArrowError::IpcError(s),
+ FlightError::ExternalError(e) => ArrowError::ExternalError(e),
+ }
+}
Review Comment:
I am not sure why we return `ArrowError` from the Flight client (instead of
`FlightError`), but I am trying to keep this PR scoped, so I just decided to
stay consistent
--
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]