You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "pitrou (via GitHub)" <gi...@apache.org> on 2023/07/17 12:43:39 UTC

[GitHub] [arrow] pitrou commented on a diff in pull request #36517: GH-36512: [C++][FlightRPC] Add async GetFlightInfo client call

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


##########
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.
   
   Sounds good to me.
   
   > 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.
   
   Perhaps we can expose the right functions or methods to make it easier?
   
   



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org