Skip to content

Commit 11e03a6

Browse files
committed
fix Swift 6.0 compilation
1 parent 334bf5e commit 11e03a6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Sources/SparkConnect/DataFrame.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1401,7 +1401,7 @@ public actor DataFrame: Sendable {
14011401
/// - condition: A condition expression.
14021402
/// - Returns: A ``MergeIntoWriter`` instance.
14031403
public func mergeInto(_ table: String, _ condition: String) async -> MergeIntoWriter {
1404-
return await MergeIntoWriter(table, self, condition)
1404+
return MergeIntoWriter(table, self, condition)
14051405
}
14061406

14071407
/// Returns a ``DataStreamWriter`` that can be used to write streaming data.

Sources/SparkConnect/MergeIntoWriter.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,13 @@ public actor MergeIntoWriter {
122122

123123
var mergeIntoTableCommand = MergeIntoTableCommand()
124124

125-
init(_ table: String, _ df: DataFrame, _ condition: String) async {
125+
init(_ table: String, _ df: DataFrame, _ condition: String) {
126126
self.table = table
127127
self.df = df
128128
self.condition = condition
129129

130-
mergeIntoTableCommand.targetTableName = table
131-
mergeIntoTableCommand.sourceTablePlan = await (df.getPlan() as! Plan).root
132-
mergeIntoTableCommand.mergeCondition.expressionString = condition.toExpressionString
130+
self.mergeIntoTableCommand.targetTableName = table
131+
self.mergeIntoTableCommand.mergeCondition.expressionString = condition.toExpressionString
133132
}
134133

135134
public var schemaEvolutionEnabled: Bool {
@@ -150,7 +149,7 @@ public actor MergeIntoWriter {
150149
}
151150

152151
/// Initialize a `WhenMatched` action with a condition.
153-
/// - Parameter condition: <#condition description#>
152+
/// - Parameter condition: The condition to be evaluated for the action.
154153
/// - Returns: A `WhenMatched` instance configured with the specified condition.
155154
public func whenMatched(_ condition: String) -> WhenMatched {
156155
WhenMatched(self, condition)
@@ -190,6 +189,7 @@ public actor MergeIntoWriter {
190189
{
191190
throw SparkConnectError.InvalidArgumentException
192191
}
192+
self.mergeIntoTableCommand.sourceTablePlan = await (self.df.getPlan() as! Plan).root
193193
self.mergeIntoTableCommand.withSchemaEvolution = self.schemaEvolution
194194

195195
var command = Spark_Connect_Command()

0 commit comments

Comments
 (0)