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


##########
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:
   Thinking about it some more: maybe the TransportStatusDetail would be 
preferable? If it's missing, then we know it's an internal error, otherwise we 
know it's an RPC error. I think you are right that consistency with the rest of 
Arrow is important, but I just don't like how synchronous Flight RPC makes it 
hard to recover the original RPC error code.



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