lidavidm commented on code in PR #381:
URL: https://github.com/apache/arrow-adbc/pull/381#discussion_r1085735300


##########
go/adbc/driver/flightsql/flightsql_adbc.go:
##########
@@ -181,9 +221,13 @@ func getFlightClient(ctx context.Context, loc string, d 
*database) (*flightsql.C
        if err != nil {
                return nil, adbc.Error{Msg: fmt.Sprintf("Invalid URI '%s': %s", 
loc, err), Code: adbc.StatusInvalidArgument}
        }
+       creds := d.creds
+       if uri.Scheme == "grpc" || uri.Scheme == "grpc+tcp" {
+               creds = insecure.NewCredentials()
+       }
 
        cl, err := flightsql.NewClient(uri.Host, nil, []flight.ClientMiddleware{
-               flight.CreateClientMiddleware(authMiddle)}, 
grpc.WithTransportCredentials(d.creds))
+               flight.CreateClientMiddleware(authMiddle)}, 
grpc.WithTransportCredentials(creds))

Review Comment:
   I wanted to have it so that you can set TLS options but still connect to an 
unencrypted backend, in case the backend in turn returns locations using TLS



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