This is an automated email from the ASF dual-hosted git repository.

curth pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new 87971df049 GH-39335: [C#] Support creating FlightClient with 
Grpc.Core.Channel (#39348)
87971df049 is described below

commit 87971df049c09671bae8a207fe2b29704fe21e8d
Author: John Garland <[email protected]>
AuthorDate: Sat Dec 23 04:27:20 2023 +1100

    GH-39335: [C#] Support creating FlightClient with Grpc.Core.Channel (#39348)
    
    as well as Grpc.Net.Client.GrpcChannel by changing our constructor arg to 
Grpc.Core.ChannelBase which both classes inherit from.
    
    ### Rationale for this change
    
    ### What changes are included in this PR?
    
    Changing the constructor of C#'s Flight Client to take in a ChannelBase 
which allows for multiple implementations of gRPC channels to be passed in.
    
    ### Are these changes tested?
    
    Existing tests already cover the use but have also manually tested in a 
separate app (
    
    ### Are there any user-facing changes?
    
    No as we're just changing the constructor to take in a parent/base class 
instead.
    * Closes: #39335
    
    Authored-by: John Garland <[email protected]>
    Signed-off-by: Curt Hagenlocher <[email protected]>
---
 csharp/src/Apache.Arrow.Flight/Client/FlightClient.cs | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/csharp/src/Apache.Arrow.Flight/Client/FlightClient.cs 
b/csharp/src/Apache.Arrow.Flight/Client/FlightClient.cs
index 5dc0d1b434..a7c459935c 100644
--- a/csharp/src/Apache.Arrow.Flight/Client/FlightClient.cs
+++ b/csharp/src/Apache.Arrow.Flight/Client/FlightClient.cs
@@ -16,10 +16,8 @@
 using System.Threading.Tasks;
 using Apache.Arrow.Flight.Internal;
 using Apache.Arrow.Flight.Protocol;
-using Apache.Arrow.Flight.Server;
 using Apache.Arrow.Flight.Server.Internal;
 using Grpc.Core;
-using Grpc.Net.Client;
 
 namespace Apache.Arrow.Flight.Client
 {
@@ -29,7 +27,7 @@ namespace Apache.Arrow.Flight.Client
 
         private readonly FlightService.FlightServiceClient _client;
 
-        public FlightClient(GrpcChannel grpcChannel)
+        public FlightClient(ChannelBase grpcChannel)
         {
             _client = new FlightService.FlightServiceClient(grpcChannel);
         }

Reply via email to