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


##########
java/flight/flight-core/src/main/java/org/apache/arrow/flight/FlightClient.java:
##########
@@ -412,6 +412,16 @@ public ClientStreamListener getWriter() {
       return writer;
     }
 
+    /**
+     * Make sure stream is drained. You must call this to be notified of any 
errors that may have
+     * happened after the exchange is complete. This should be called after 
`getWriter().completed()`
+     * and instead of `getWriter().getResult()`.
+     */
+    public void getResult() {
+      // After exchange is complete, make sure stream is drained to propagate 
errors through reader
+      reader.next();
+    }
+
     /** Shut down the streams in this call. */
     @Override
     public void close() throws Exception {

Review Comment:
   Sounds good.



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