Skip to content

Commit 2304511

Browse files
committed
[SPARK-52369] Fix Session ID to be lowercased always
### What changes were proposed in this pull request? This PR aims to fix `SparkSession` to make `Session ID` lowercased always. ### Why are the changes needed? Apache Spark handles `SessionID` in a case sensitive way and assumes lowercases always. ### Does this PR introduce _any_ user-facing change? Yes, previously, the user-given Session ID might be mismatched due to the case-sensitivity. ### How was this patch tested? Pass the CIs. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #188 from dongjoon-hyun/SPARK-52369. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent dc6d0e8 commit 2304511

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/SparkConnect/SparkSession.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ public actor SparkSession {
4444
self.client = SparkConnectClient(remote: connection)
4545
// Since `Session ID` belongs to `SparkSession`, we handle this here.
4646
if connection.contains(regexSessionID) {
47-
self.sessionID = connection.firstMatch(of: regexSessionID)!.1.uppercased()
47+
self.sessionID = connection.firstMatch(of: regexSessionID)!.1.lowercased()
4848
} else {
49-
self.sessionID = UUID().uuidString
49+
self.sessionID = UUID().uuidString.lowercased()
5050
}
5151
self.conf = RuntimeConf(self.client)
5252
}

0 commit comments

Comments
 (0)