CurtHagenlocher commented on code in PR #285:
URL: https://github.com/apache/arrow-dotnet/pull/285#discussion_r2935938847


##########
src/Apache.Arrow.Flight/Client/FlightClient.cs:
##########
@@ -27,15 +28,28 @@ public class FlightClient
         internal static readonly Empty EmptyInstance = new Empty();
 
         private readonly FlightService.FlightServiceClient _client;
+        private readonly ICompressionCodecFactory _compressionCodecFactory;
 
         public FlightClient(ChannelBase grpcChannel)
+            : this(grpcChannel, null)
+        {
+        }
+
+        public FlightClient(ChannelBase grpcChannel, ICompressionCodecFactory 
compressionCodecFactory)
         {
             _client = new FlightService.FlightServiceClient(grpcChannel);
+            _compressionCodecFactory = compressionCodecFactory;
         }
 
         public FlightClient(CallInvoker callInvoker)
+            : this(callInvoker, null)
+        {
+        }
+
+        public FlightClient(CallInvoker callInvoker, ICompressionCodecFactory 
compressionCodecFactory)

Review Comment:
   If I understand the error message in the failing tests correctly -- and I'm 
not sure I do -- then there can only be one constructor available to DI whose 
first argument is `CallInvoker`. I *think* we can work around this by marking 
the added constructor with `[ActivatorUtilitiesConstructor]`, but this then 
also requires that we have a dependency on the 
`Microsoft.Extensions.DependencyInjection.Abstractions` package which would be 
unfortunate. I am not a user of Flight (or more broadly of Grpc) so I don't 
know what the tradeoffs here are.
   
   I'm also not super keen on dependency injection :(.



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