Skip to content

Commit ce8f76f

Browse files
committed
Address comment
1 parent 8db910f commit ce8f76f

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

Sources/SparkConnect/SparkConnectClient.swift

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public actor SparkConnectClient {
6868
var request = AnalyzePlanRequest()
6969
request.clientType = clientType
7070
request.userContext = userContext
71-
request.sessionID = sessionID
71+
request.sessionID = self.sessionID!
7272
request.analyze = .sparkVersion(version)
7373
let response = try await service.analyzePlan(request)
7474
return response
@@ -190,10 +190,9 @@ public actor SparkConnectClient {
190190
return plan
191191
}
192192

193-
/// Create a ``ExecutePlanRequest`` instance with the given session ID and plan.
193+
/// Create a ``ExecutePlanRequest`` instance with the given plan.
194194
/// The operation ID is created by UUID.
195195
/// - Parameters:
196-
/// - sessionID: A string for the existing session ID.
197196
/// - plan: A plan to execute.
198197
/// - Returns: An ``ExecutePlanRequest`` instance.
199198
func getExecutePlanRequest(_ sessionID: String, _ plan: Plan) async
@@ -202,15 +201,14 @@ public actor SparkConnectClient {
202201
var request = ExecutePlanRequest()
203202
request.clientType = clientType
204203
request.userContext = userContext
205-
request.sessionID = sessionID
204+
request.sessionID = self.sessionID!
206205
request.operationID = UUID().uuidString
207206
request.plan = plan
208207
return request
209208
}
210209

211-
/// Create a ``AnalyzePlanRequest`` instance with the given session ID and plan.
210+
/// Create a ``AnalyzePlanRequest`` instance with the given plan.
212211
/// - Parameters:
213-
/// - sessionID: A string for the existing session ID.
214212
/// - plan: A plan to analyze.
215213
/// - Returns: An ``AnalyzePlanRequest`` instance
216214
func getAnalyzePlanRequest(_ sessionID: String, _ plan: Plan) async
@@ -219,7 +217,7 @@ public actor SparkConnectClient {
219217
var request = AnalyzePlanRequest()
220218
request.clientType = clientType
221219
request.userContext = userContext
222-
request.sessionID = sessionID
220+
request.sessionID = self.sessionID!
223221
var schema = AnalyzePlanRequest.Schema()
224222
schema.plan = plan
225223
request.analyze = .schema(schema)

Tests/SparkConnectTests/SparkConnectClientTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import Testing
2222

2323
@testable import SparkConnect
2424

25-
/// A test suite for `Client`
25+
/// A test suite for `SparkConnectClient`
2626
@Suite(.serialized)
2727
struct SparkConnectClientTests {
2828
@Test

0 commit comments

Comments
 (0)