aiguofer commented on code in PR #33967:
URL: https://github.com/apache/arrow/pull/33967#discussion_r1097850258


##########
java/flight/flight-core/src/main/java/org/apache/arrow/flight/FlightClient.java:
##########
@@ -353,10 +355,11 @@ public void onCompleted() {
    */
   public ExchangeReaderWriter doExchange(FlightDescriptor descriptor, 
CallOption... options) {
     Preconditions.checkNotNull(descriptor, "descriptor must not be null");
-    final io.grpc.CallOptions callOptions = CallOptions.wrapStub(asyncStub, 
options).getCallOptions();
+    FlightServiceStub stub = CallOptions.wrapStub(asyncStub, options);
+    final io.grpc.CallOptions callOptions = stub.getCallOptions();
 
     try {
-      final ClientCall<ArrowMessage, ArrowMessage> call = 
interceptedChannel.newCall(doExchangeDescriptor, callOptions);
+      final ClientCall<ArrowMessage, ArrowMessage> call = 
stub.getChannel().newCall(doExchangeDescriptor, callOptions);

Review Comment:
   Oh I meant this would be great as a public method in `FlightServiceStub`. 
There's a lot of code in there that could use it, but I believe that is an 
auto-generated source file so I don't know how to change it.
   
   I went ahead and created a private method in `FlightClient` to do the same.



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