CurtHagenlocher commented on code in PR #2014:
URL: https://github.com/apache/arrow-adbc/pull/2014#discussion_r1682073568


##########
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:
   What's the rationale behind accepting a scheme as a separate parameter 
versus e.g. an url parameter? It seems to increase the chance of unexpected 
parameter combinations?



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