lidavidm commented on code in PR #36517:
URL: https://github.com/apache/arrow/pull/36517#discussion_r1263215509


##########
cpp/src/arrow/flight/client.cc:
##########
@@ -620,6 +621,17 @@ Status FlightClient::GetFlightInfo(const 
FlightCallOptions& options,
   return GetFlightInfo(options, descriptor).Value(info);
 }
 
+void FlightClient::GetFlightInfo(const FlightCallOptions& options,
+                                 const FlightDescriptor& descriptor,
+                                 std::shared_ptr<AsyncListener<FlightInfo>> 
listener) {
+  if (auto status = CheckOpen(); !status.ok()) {
+    listener->OnFinish(
+        TransportStatus{TransportStatusCode::kInternal, status.ToString()});

Review Comment:
   It's intentional; I've come to think that it was a mistake to try to map the 
RPC errors onto the Arrow statuses, because they don't match, and because they 
carry different kinds of metadata (e.g. Arrow Status only allows one detail 
with a type while gRPC status is an array of binary blobs).
   
   ArrowStatusDetail is a way to propagate internal errors from the client (not 
so useful here, but for example if a server sends an invalid Arrow record 
batch).
   
   And because the status is given to you in a callback, the macros aren't 
useful anyways. (You can still convert the TransportStatus to an Arrow Status 
if you want to use arrow::Future, for instance.)



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