CurtHagenlocher commented on code in PR #2014:
URL: https://github.com/apache/arrow-adbc/pull/2014#discussion_r1682074817
##########
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:
"uri" is even a standard ADBC option name.
--
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]