@@ -87,6 +87,7 @@ public actor SparkConnectClient {
8787 /// As a test connection, this sends the server `SparkVersion` request.
8888 /// - Parameter sessionID: A string for the session ID.
8989 /// - Returns: An `AnalyzePlanResponse` instance for `SparkVersion`
90+ @discardableResult
9091 func connect( _ sessionID: String ) async throws -> AnalyzePlanResponse {
9192 try await withGPRC { client in
9293 // To prevent server-side `INVALID_HANDLE.FORMAT (SQLSTATE: HY000)` exception.
@@ -137,14 +138,15 @@ public actor SparkConnectClient {
137138 /// Request the server to set a map of configurations for this session.
138139 /// - Parameter map: A map of key-value pairs to set.
139140 /// - Returns: Always return true.
141+ @discardableResult
140142 func setConf( map: [ String : String ] ) async throws -> Bool {
141143 try await withGPRC { client in
142144 let service = SparkConnectService . Client ( wrapping: client)
143145 var request = getConfigRequestSet ( map: map)
144146 request. clientType = clientType
145147 request. userContext = userContext
146148 request. sessionID = self . sessionID!
147- let _ = try await service. config ( request)
149+ _ = try await service. config ( request)
148150 return true
149151 }
150152 }
@@ -160,7 +162,11 @@ public actor SparkConnectClient {
160162 request. operation. opType = . unset( unset)
161163 return request
162164 }
163-
165+
166+ /// Request the server to unset keys
167+ /// - Parameter keys: An array of keys
168+ /// - Returns: Always return true
169+ @discardableResult
164170 func unsetConf( keys: [ String ] ) async throws -> Bool {
165171 try await withGPRC { client in
166172 let service = SparkConnectService . Client ( wrapping: client)
@@ -509,6 +515,7 @@ public actor SparkConnectClient {
509515 self . result. append ( response)
510516 }
511517
518+ @discardableResult
512519 func execute( _ sessionID: String , _ command: Command ) async throws -> [ ExecutePlanResponse ] {
513520 self . result. removeAll ( )
514521 try await withGPRC { client in
@@ -555,6 +562,7 @@ public actor SparkConnectClient {
555562 /// Parse a DDL string to ``Spark_Connect_DataType`` instance.
556563 /// - Parameter ddlString: A string to parse.
557564 /// - Returns: A ``Spark_Connect_DataType`` instance.
565+ @discardableResult
558566 func ddlParse( _ ddlString: String ) async throws -> Spark_Connect_DataType {
559567 try await withGPRC { client in
560568 let service = SparkConnectService . Client ( wrapping: client)
0 commit comments