File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ public actor SparkConnectClient {
4949#endif
5050 for param in self . url. path. split ( separator: " ; " ) . dropFirst ( ) . filter ( { !$0. isEmpty } ) {
5151 let kv = param. split ( separator: " = " )
52- switch String ( kv [ 0 ] ) {
52+ switch String ( kv [ 0 ] ) . lowercased ( ) {
5353 case URIParams . PARAM_USER_AGENT:
5454 clientType = String ( kv [ 1 ] )
5555 case URIParams . PARAM_TOKEN:
@@ -596,11 +596,11 @@ public actor SparkConnectClient {
596596 }
597597
598598 private enum URIParams {
599- static let PARAM_USER_ID = " userId "
600- static let PARAM_USER_AGENT = " userAgent "
599+ static let PARAM_GRPC_MAX_MESSAGE_SIZE = " grpc_max_message_size "
600+ static let PARAM_SESSION_ID = " session_id "
601601 static let PARAM_TOKEN = " token "
602- static let PARAM_USE_SSL = " useSsl "
603- static let PARAM_SESSION_ID = " sessionId "
604- static let PARAM_GRPC_MAX_MESSAGE_SIZE = " grpcMaxMessageSize "
602+ static let PARAM_USER_AGENT = " user_agent "
603+ static let PARAM_USER_ID = " user_id "
604+ static let PARAM_USE_SSL = " use_ssl "
605605 }
606606}
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ struct SparkConnectClientTests {
3535
3636 @Test
3737 func parameters( ) async throws {
38- let client = SparkConnectClient ( remote: " sc://host1:123/;token =abcd;userId =test;userAgent =myagent " )
38+ let client = SparkConnectClient ( remote: " sc://host1:123/;tOkeN =abcd;user_ID =test;USER_agent =myagent " )
3939 #expect( await client. token == " abcd " )
4040 #expect( await client. userContext. userID == " test " )
4141 #expect( await client. clientType == " myagent " )
You can’t perform that action at this time.
0 commit comments