Skip to content

Commit b70eeb7

Browse files
committed
[MINOR] Remove build warnings on try expression in SparkSession
### What changes were proposed in this pull request? This PR aims to remove build warnings on `try` expression in `SparkSession`. ### Why are the changes needed? Due to the unnecessary `try`, it shows repetitive warnings currently. ``` /Users/dongjoon/APACHE/spark-connect-swift/Sources/SparkConnect/SparkSession.swift:109:12: warning: no calls to throwing functions occur within 'try' expression 107 | /// - Returns: A ``DataFrame`` instance. 108 | public func range(_ start: Int64, _ end: Int64, _ step: Int64 = 1) async throws -> DataFrame { 109 | return try await DataFrame(spark: self, plan: client.getPlanRange(start, end, step)) | `- warning: no calls to throwing functions occur within 'try' expression 110 | } 111 | /Users/dongjoon/APACHE/spark-connect-swift/Sources/SparkConnect/SparkSession.swift:109:12: warning: no calls to throwing functions occur within 'try' expression 107 | /// - Returns: A ``DataFrame`` instance. 108 | public func range(_ start: Int64, _ end: Int64, _ step: Int64 = 1) async throws -> DataFrame { 109 | return try await DataFrame(spark: self, plan: client.getPlanRange(start, end, step)) | `- warning: no calls to throwing functions occur within 'try' expression 110 | } 111 | /Users/dongjoon/APACHE/spark-connect-swift/Sources/SparkConnect/SparkSession.swift:109:12: warning: no calls to throwing functions occur within 'try' expression 107 | /// - Returns: A ``DataFrame`` instance. 108 | public func range(_ start: Int64, _ end: Int64, _ step: Int64 = 1) async throws -> DataFrame { 109 | return try await DataFrame(spark: self, plan: client.getPlanRange(start, end, step)) | `- warning: no calls to throwing functions occur within 'try' expression 110 | } 111 | ``` ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass the CIs. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #24 from dongjoon-hyun/buildwarning. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent c7ef15f commit b70eeb7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/SparkConnect/SparkSession.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public actor SparkSession {
106106
/// - step: A value for the step.
107107
/// - Returns: A ``DataFrame`` instance.
108108
public func range(_ start: Int64, _ end: Int64, _ step: Int64 = 1) async throws -> DataFrame {
109-
return try await DataFrame(spark: self, plan: client.getPlanRange(start, end, step))
109+
return await DataFrame(spark: self, plan: client.getPlanRange(start, end, step))
110110
}
111111

112112
/// Create a ``DataFrame`` for the given SQL statement.

0 commit comments

Comments
 (0)