Skip to content

Commit 1843321

Browse files
committed
[SPARK-52631] Update Spark Connect-generated Swift source code
1 parent 38ffbd3 commit 1843321

File tree

7 files changed

+1742
-27
lines changed

7 files changed

+1742
-27
lines changed

Sources/SparkConnect/base.pb.swift

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,6 +1296,24 @@ struct Spark_Connect_ExecutePlanResponse: Sendable {
12961296
set {responseType = .mlCommandResult(newValue)}
12971297
}
12981298

1299+
/// Response containing pipeline event that is streamed back to the client during a pipeline run
1300+
var pipelineEventResult: Spark_Connect_PipelineEventResult {
1301+
get {
1302+
if case .pipelineEventResult(let v)? = responseType {return v}
1303+
return Spark_Connect_PipelineEventResult()
1304+
}
1305+
set {responseType = .pipelineEventResult(newValue)}
1306+
}
1307+
1308+
/// Pipeline command response
1309+
var pipelineCommandResult: Spark_Connect_PipelineCommandResult {
1310+
get {
1311+
if case .pipelineCommandResult(let v)? = responseType {return v}
1312+
return Spark_Connect_PipelineCommandResult()
1313+
}
1314+
set {responseType = .pipelineCommandResult(newValue)}
1315+
}
1316+
12991317
/// Support arbitrary result objects.
13001318
var `extension`: SwiftProtobuf.Google_Protobuf_Any {
13011319
get {
@@ -1356,6 +1374,10 @@ struct Spark_Connect_ExecutePlanResponse: Sendable {
13561374
case checkpointCommandResult(Spark_Connect_CheckpointCommandResult)
13571375
/// ML command response
13581376
case mlCommandResult(Spark_Connect_MlCommandResult)
1377+
/// Response containing pipeline event that is streamed back to the client during a pipeline run
1378+
case pipelineEventResult(Spark_Connect_PipelineEventResult)
1379+
/// Pipeline command response
1380+
case pipelineCommandResult(Spark_Connect_PipelineCommandResult)
13591381
/// Support arbitrary result objects.
13601382
case `extension`(SwiftProtobuf.Google_Protobuf_Any)
13611383

@@ -4952,6 +4974,8 @@ extension Spark_Connect_ExecutePlanResponse: SwiftProtobuf.Message, SwiftProtobu
49524974
18: .standard(proto: "execution_progress"),
49534975
19: .standard(proto: "checkpoint_command_result"),
49544976
20: .standard(proto: "ml_command_result"),
4977+
21: .standard(proto: "pipeline_event_result"),
4978+
22: .standard(proto: "pipeline_command_result"),
49554979
999: .same(proto: "extension"),
49564980
4: .same(proto: "metrics"),
49574981
6: .standard(proto: "observed_metrics"),
@@ -5127,6 +5151,32 @@ extension Spark_Connect_ExecutePlanResponse: SwiftProtobuf.Message, SwiftProtobu
51275151
self.responseType = .mlCommandResult(v)
51285152
}
51295153
}()
5154+
case 21: try {
5155+
var v: Spark_Connect_PipelineEventResult?
5156+
var hadOneofValue = false
5157+
if let current = self.responseType {
5158+
hadOneofValue = true
5159+
if case .pipelineEventResult(let m) = current {v = m}
5160+
}
5161+
try decoder.decodeSingularMessageField(value: &v)
5162+
if let v = v {
5163+
if hadOneofValue {try decoder.handleConflictingOneOf()}
5164+
self.responseType = .pipelineEventResult(v)
5165+
}
5166+
}()
5167+
case 22: try {
5168+
var v: Spark_Connect_PipelineCommandResult?
5169+
var hadOneofValue = false
5170+
if let current = self.responseType {
5171+
hadOneofValue = true
5172+
if case .pipelineCommandResult(let m) = current {v = m}
5173+
}
5174+
try decoder.decodeSingularMessageField(value: &v)
5175+
if let v = v {
5176+
if hadOneofValue {try decoder.handleConflictingOneOf()}
5177+
self.responseType = .pipelineCommandResult(v)
5178+
}
5179+
}()
51305180
case 999: try {
51315181
var v: SwiftProtobuf.Google_Protobuf_Any?
51325182
var hadOneofValue = false
@@ -5220,6 +5270,14 @@ extension Spark_Connect_ExecutePlanResponse: SwiftProtobuf.Message, SwiftProtobu
52205270
guard case .mlCommandResult(let v)? = self.responseType else { preconditionFailure() }
52215271
try visitor.visitSingularMessageField(value: v, fieldNumber: 20)
52225272
}()
5273+
case .pipelineEventResult?: try {
5274+
guard case .pipelineEventResult(let v)? = self.responseType else { preconditionFailure() }
5275+
try visitor.visitSingularMessageField(value: v, fieldNumber: 21)
5276+
}()
5277+
case .pipelineCommandResult?: try {
5278+
guard case .pipelineCommandResult(let v)? = self.responseType else { preconditionFailure() }
5279+
try visitor.visitSingularMessageField(value: v, fieldNumber: 22)
5280+
}()
52235281
case .extension?: try {
52245282
guard case .extension(let v)? = self.responseType else { preconditionFailure() }
52255283
try visitor.visitSingularMessageField(value: v, fieldNumber: 999)

Sources/SparkConnect/commands.pb.swift

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,14 @@ struct Spark_Connect_Command: Sendable {
235235
set {commandType = .executeExternalCommand(newValue)}
236236
}
237237

238+
var pipelineCommand: Spark_Connect_PipelineCommand {
239+
get {
240+
if case .pipelineCommand(let v)? = commandType {return v}
241+
return Spark_Connect_PipelineCommand()
242+
}
243+
set {commandType = .pipelineCommand(newValue)}
244+
}
245+
238246
/// This field is used to mark extensions to the protocol. When plugins generate arbitrary
239247
/// Commands they can add them here. During the planning the correct resolution is done.
240248
var `extension`: SwiftProtobuf.Google_Protobuf_Any {
@@ -266,6 +274,7 @@ struct Spark_Connect_Command: Sendable {
266274
case mergeIntoTableCommand(Spark_Connect_MergeIntoTableCommand)
267275
case mlCommand(Spark_Connect_MlCommand)
268276
case executeExternalCommand(Spark_Connect_ExecuteExternalCommand)
277+
case pipelineCommand(Spark_Connect_PipelineCommand)
269278
/// This field is used to mark extensions to the protocol. When plugins generate arbitrary
270279
/// Commands they can add them here. During the planning the correct resolution is done.
271280
case `extension`(SwiftProtobuf.Google_Protobuf_Any)
@@ -1873,6 +1882,7 @@ extension Spark_Connect_Command: SwiftProtobuf.Message, SwiftProtobuf._MessageIm
18731882
16: .standard(proto: "merge_into_table_command"),
18741883
17: .standard(proto: "ml_command"),
18751884
18: .standard(proto: "execute_external_command"),
1885+
19: .standard(proto: "pipeline_command"),
18761886
999: .same(proto: "extension"),
18771887
]
18781888

@@ -2116,6 +2126,19 @@ extension Spark_Connect_Command: SwiftProtobuf.Message, SwiftProtobuf._MessageIm
21162126
self.commandType = .executeExternalCommand(v)
21172127
}
21182128
}()
2129+
case 19: try {
2130+
var v: Spark_Connect_PipelineCommand?
2131+
var hadOneofValue = false
2132+
if let current = self.commandType {
2133+
hadOneofValue = true
2134+
if case .pipelineCommand(let m) = current {v = m}
2135+
}
2136+
try decoder.decodeSingularMessageField(value: &v)
2137+
if let v = v {
2138+
if hadOneofValue {try decoder.handleConflictingOneOf()}
2139+
self.commandType = .pipelineCommand(v)
2140+
}
2141+
}()
21192142
case 999: try {
21202143
var v: SwiftProtobuf.Google_Protobuf_Any?
21212144
var hadOneofValue = false
@@ -2212,6 +2235,10 @@ extension Spark_Connect_Command: SwiftProtobuf.Message, SwiftProtobuf._MessageIm
22122235
guard case .executeExternalCommand(let v)? = self.commandType else { preconditionFailure() }
22132236
try visitor.visitSingularMessageField(value: v, fieldNumber: 18)
22142237
}()
2238+
case .pipelineCommand?: try {
2239+
guard case .pipelineCommand(let v)? = self.commandType else { preconditionFailure() }
2240+
try visitor.visitSingularMessageField(value: v, fieldNumber: 19)
2241+
}()
22152242
case .extension?: try {
22162243
guard case .extension(let v)? = self.commandType else { preconditionFailure() }
22172244
try visitor.visitSingularMessageField(value: v, fieldNumber: 999)

Sources/SparkConnect/expressions.pb.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1774,6 +1774,9 @@ struct Spark_Connect_SubqueryExpression: Sendable {
17741774
/// Clears the value of `tableArgOptions`. Subsequent reads from it will return its default value.
17751775
mutating func clearTableArgOptions() {self._tableArgOptions = nil}
17761776

1777+
/// (Optional) IN subquery values.
1778+
var inSubqueryValues: [Spark_Connect_Expression] = []
1779+
17771780
var unknownFields = SwiftProtobuf.UnknownStorage()
17781781

17791782
enum SubqueryType: SwiftProtobuf.Enum, Swift.CaseIterable {
@@ -1782,6 +1785,7 @@ struct Spark_Connect_SubqueryExpression: Sendable {
17821785
case scalar // = 1
17831786
case exists // = 2
17841787
case tableArg // = 3
1788+
case `in` // = 4
17851789
case UNRECOGNIZED(Int)
17861790

17871791
init() {
@@ -1794,6 +1798,7 @@ struct Spark_Connect_SubqueryExpression: Sendable {
17941798
case 1: self = .scalar
17951799
case 2: self = .exists
17961800
case 3: self = .tableArg
1801+
case 4: self = .in
17971802
default: self = .UNRECOGNIZED(rawValue)
17981803
}
17991804
}
@@ -1804,6 +1809,7 @@ struct Spark_Connect_SubqueryExpression: Sendable {
18041809
case .scalar: return 1
18051810
case .exists: return 2
18061811
case .tableArg: return 3
1812+
case .in: return 4
18071813
case .UNRECOGNIZED(let i): return i
18081814
}
18091815
}
@@ -1814,6 +1820,7 @@ struct Spark_Connect_SubqueryExpression: Sendable {
18141820
.scalar,
18151821
.exists,
18161822
.tableArg,
1823+
.in,
18171824
]
18181825

18191826
}
@@ -4774,6 +4781,7 @@ extension Spark_Connect_SubqueryExpression: SwiftProtobuf.Message, SwiftProtobuf
47744781
1: .standard(proto: "plan_id"),
47754782
2: .standard(proto: "subquery_type"),
47764783
3: .standard(proto: "table_arg_options"),
4784+
4: .standard(proto: "in_subquery_values"),
47774785
]
47784786

47794787
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
@@ -4785,6 +4793,7 @@ extension Spark_Connect_SubqueryExpression: SwiftProtobuf.Message, SwiftProtobuf
47854793
case 1: try { try decoder.decodeSingularInt64Field(value: &self.planID) }()
47864794
case 2: try { try decoder.decodeSingularEnumField(value: &self.subqueryType) }()
47874795
case 3: try { try decoder.decodeSingularMessageField(value: &self._tableArgOptions) }()
4796+
case 4: try { try decoder.decodeRepeatedMessageField(value: &self.inSubqueryValues) }()
47884797
default: break
47894798
}
47904799
}
@@ -4804,13 +4813,17 @@ extension Spark_Connect_SubqueryExpression: SwiftProtobuf.Message, SwiftProtobuf
48044813
try { if let v = self._tableArgOptions {
48054814
try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
48064815
} }()
4816+
if !self.inSubqueryValues.isEmpty {
4817+
try visitor.visitRepeatedMessageField(value: self.inSubqueryValues, fieldNumber: 4)
4818+
}
48074819
try unknownFields.traverse(visitor: &visitor)
48084820
}
48094821

48104822
static func ==(lhs: Spark_Connect_SubqueryExpression, rhs: Spark_Connect_SubqueryExpression) -> Bool {
48114823
if lhs.planID != rhs.planID {return false}
48124824
if lhs.subqueryType != rhs.subqueryType {return false}
48134825
if lhs._tableArgOptions != rhs._tableArgOptions {return false}
4826+
if lhs.inSubqueryValues != rhs.inSubqueryValues {return false}
48144827
if lhs.unknownFields != rhs.unknownFields {return false}
48154828
return true
48164829
}
@@ -4822,6 +4835,7 @@ extension Spark_Connect_SubqueryExpression.SubqueryType: SwiftProtobuf._ProtoNam
48224835
1: .same(proto: "SUBQUERY_TYPE_SCALAR"),
48234836
2: .same(proto: "SUBQUERY_TYPE_EXISTS"),
48244837
3: .same(proto: "SUBQUERY_TYPE_TABLE_ARG"),
4838+
4: .same(proto: "SUBQUERY_TYPE_IN"),
48254839
]
48264840
}
48274841

0 commit comments

Comments
 (0)