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


##########
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:
   it'd be nice to add something like:
   
   ```
       public <RequestT, ResponseT> ClientCall<RequestT, ResponseT> 
newCall(MethodDescriptor<RequestT, ResponseT> descriptor) {
         return getChannel().newCall(descriptor, getCallOptions());
       }
   ```
   
   to the stub so we could just do `stub.newCall(descriptor)`, but it looks 
like that class is auto-generated so I'm not sure where to add it.



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