birschick-bq commented on code in PR #2014:
URL: https://github.com/apache/arrow-adbc/pull/2014#discussion_r1685088293


##########
csharp/src/Drivers/Apache/Spark/SparkConnection.cs:
##########
@@ -269,32 +271,58 @@ protected override async ValueTask<TProtocol> 
CreateProtocolAsync()
                 Trace.TraceError($"key = {property} value = 
{properties[property]}");
             }
 
-            string hostName = properties[SparkParameters.HostName];
-            string path = properties[SparkParameters.Path];
-            string token;
-
-            if (properties.ContainsKey(SparkParameters.Token))
-                token = properties[SparkParameters.Token];
-            else
-                token = properties[SparkParameters.Password];
-
-            HttpClient httpClient = new HttpClient();
-            httpClient.BaseAddress = new UriBuilder(Uri.UriSchemeHttps, 
hostName, -1, path).Uri;
-            httpClient.DefaultRequestHeaders.Authorization = new 
AuthenticationHeaderValue("Bearer", token);
+            properties.TryGetValue(SparkParameters.HostName, out string? 
hostName);
+            properties.TryGetValue(SparkParameters.Scheme, out string? scheme);

Review Comment:
   Added support for "uri" and removed "scheme". Also reference 
`AdbcOptions.Username/Password/Uri`



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