Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions Sources/SparkConnect/base.pb.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1296,6 +1296,24 @@ struct Spark_Connect_ExecutePlanResponse: Sendable {
set {responseType = .mlCommandResult(newValue)}
}

/// Response containing pipeline event that is streamed back to the client during a pipeline run
var pipelineEventResult: Spark_Connect_PipelineEventResult {
get {
if case .pipelineEventResult(let v)? = responseType {return v}
return Spark_Connect_PipelineEventResult()
}
set {responseType = .pipelineEventResult(newValue)}
}

/// Pipeline command response
var pipelineCommandResult: Spark_Connect_PipelineCommandResult {
get {
if case .pipelineCommandResult(let v)? = responseType {return v}
return Spark_Connect_PipelineCommandResult()
}
set {responseType = .pipelineCommandResult(newValue)}
}

/// Support arbitrary result objects.
var `extension`: SwiftProtobuf.Google_Protobuf_Any {
get {
Expand Down Expand Up @@ -1356,6 +1374,10 @@ struct Spark_Connect_ExecutePlanResponse: Sendable {
case checkpointCommandResult(Spark_Connect_CheckpointCommandResult)
/// ML command response
case mlCommandResult(Spark_Connect_MlCommandResult)
/// Response containing pipeline event that is streamed back to the client during a pipeline run
case pipelineEventResult(Spark_Connect_PipelineEventResult)
/// Pipeline command response
case pipelineCommandResult(Spark_Connect_PipelineCommandResult)
/// Support arbitrary result objects.
case `extension`(SwiftProtobuf.Google_Protobuf_Any)

Expand Down Expand Up @@ -4952,6 +4974,8 @@ extension Spark_Connect_ExecutePlanResponse: SwiftProtobuf.Message, SwiftProtobu
18: .standard(proto: "execution_progress"),
19: .standard(proto: "checkpoint_command_result"),
20: .standard(proto: "ml_command_result"),
21: .standard(proto: "pipeline_event_result"),
22: .standard(proto: "pipeline_command_result"),
999: .same(proto: "extension"),
4: .same(proto: "metrics"),
6: .standard(proto: "observed_metrics"),
Expand Down Expand Up @@ -5127,6 +5151,32 @@ extension Spark_Connect_ExecutePlanResponse: SwiftProtobuf.Message, SwiftProtobu
self.responseType = .mlCommandResult(v)
}
}()
case 21: try {
var v: Spark_Connect_PipelineEventResult?
var hadOneofValue = false
if let current = self.responseType {
hadOneofValue = true
if case .pipelineEventResult(let m) = current {v = m}
}
try decoder.decodeSingularMessageField(value: &v)
if let v = v {
if hadOneofValue {try decoder.handleConflictingOneOf()}
self.responseType = .pipelineEventResult(v)
}
}()
case 22: try {
var v: Spark_Connect_PipelineCommandResult?
var hadOneofValue = false
if let current = self.responseType {
hadOneofValue = true
if case .pipelineCommandResult(let m) = current {v = m}
}
try decoder.decodeSingularMessageField(value: &v)
if let v = v {
if hadOneofValue {try decoder.handleConflictingOneOf()}
self.responseType = .pipelineCommandResult(v)
}
}()
case 999: try {
var v: SwiftProtobuf.Google_Protobuf_Any?
var hadOneofValue = false
Expand Down Expand Up @@ -5220,6 +5270,14 @@ extension Spark_Connect_ExecutePlanResponse: SwiftProtobuf.Message, SwiftProtobu
guard case .mlCommandResult(let v)? = self.responseType else { preconditionFailure() }
try visitor.visitSingularMessageField(value: v, fieldNumber: 20)
}()
case .pipelineEventResult?: try {
guard case .pipelineEventResult(let v)? = self.responseType else { preconditionFailure() }
try visitor.visitSingularMessageField(value: v, fieldNumber: 21)
}()
case .pipelineCommandResult?: try {
guard case .pipelineCommandResult(let v)? = self.responseType else { preconditionFailure() }
try visitor.visitSingularMessageField(value: v, fieldNumber: 22)
}()
case .extension?: try {
guard case .extension(let v)? = self.responseType else { preconditionFailure() }
try visitor.visitSingularMessageField(value: v, fieldNumber: 999)
Expand Down
27 changes: 27 additions & 0 deletions Sources/SparkConnect/commands.pb.swift
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,14 @@ struct Spark_Connect_Command: Sendable {
set {commandType = .executeExternalCommand(newValue)}
}

var pipelineCommand: Spark_Connect_PipelineCommand {
get {
if case .pipelineCommand(let v)? = commandType {return v}
return Spark_Connect_PipelineCommand()
}
set {commandType = .pipelineCommand(newValue)}
}

/// This field is used to mark extensions to the protocol. When plugins generate arbitrary
/// Commands they can add them here. During the planning the correct resolution is done.
var `extension`: SwiftProtobuf.Google_Protobuf_Any {
Expand Down Expand Up @@ -266,6 +274,7 @@ struct Spark_Connect_Command: Sendable {
case mergeIntoTableCommand(Spark_Connect_MergeIntoTableCommand)
case mlCommand(Spark_Connect_MlCommand)
case executeExternalCommand(Spark_Connect_ExecuteExternalCommand)
case pipelineCommand(Spark_Connect_PipelineCommand)
/// This field is used to mark extensions to the protocol. When plugins generate arbitrary
/// Commands they can add them here. During the planning the correct resolution is done.
case `extension`(SwiftProtobuf.Google_Protobuf_Any)
Expand Down Expand Up @@ -1873,6 +1882,7 @@ extension Spark_Connect_Command: SwiftProtobuf.Message, SwiftProtobuf._MessageIm
16: .standard(proto: "merge_into_table_command"),
17: .standard(proto: "ml_command"),
18: .standard(proto: "execute_external_command"),
19: .standard(proto: "pipeline_command"),
999: .same(proto: "extension"),
]

Expand Down Expand Up @@ -2116,6 +2126,19 @@ extension Spark_Connect_Command: SwiftProtobuf.Message, SwiftProtobuf._MessageIm
self.commandType = .executeExternalCommand(v)
}
}()
case 19: try {
var v: Spark_Connect_PipelineCommand?
var hadOneofValue = false
if let current = self.commandType {
hadOneofValue = true
if case .pipelineCommand(let m) = current {v = m}
}
try decoder.decodeSingularMessageField(value: &v)
if let v = v {
if hadOneofValue {try decoder.handleConflictingOneOf()}
self.commandType = .pipelineCommand(v)
}
}()
case 999: try {
var v: SwiftProtobuf.Google_Protobuf_Any?
var hadOneofValue = false
Expand Down Expand Up @@ -2212,6 +2235,10 @@ extension Spark_Connect_Command: SwiftProtobuf.Message, SwiftProtobuf._MessageIm
guard case .executeExternalCommand(let v)? = self.commandType else { preconditionFailure() }
try visitor.visitSingularMessageField(value: v, fieldNumber: 18)
}()
case .pipelineCommand?: try {
guard case .pipelineCommand(let v)? = self.commandType else { preconditionFailure() }
try visitor.visitSingularMessageField(value: v, fieldNumber: 19)
}()
case .extension?: try {
guard case .extension(let v)? = self.commandType else { preconditionFailure() }
try visitor.visitSingularMessageField(value: v, fieldNumber: 999)
Expand Down
14 changes: 14 additions & 0 deletions Sources/SparkConnect/expressions.pb.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1774,6 +1774,9 @@ struct Spark_Connect_SubqueryExpression: Sendable {
/// Clears the value of `tableArgOptions`. Subsequent reads from it will return its default value.
mutating func clearTableArgOptions() {self._tableArgOptions = nil}

/// (Optional) IN subquery values.
var inSubqueryValues: [Spark_Connect_Expression] = []

var unknownFields = SwiftProtobuf.UnknownStorage()

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

init() {
Expand All @@ -1794,6 +1798,7 @@ struct Spark_Connect_SubqueryExpression: Sendable {
case 1: self = .scalar
case 2: self = .exists
case 3: self = .tableArg
case 4: self = .in
default: self = .UNRECOGNIZED(rawValue)
}
}
Expand All @@ -1804,6 +1809,7 @@ struct Spark_Connect_SubqueryExpression: Sendable {
case .scalar: return 1
case .exists: return 2
case .tableArg: return 3
case .in: return 4
case .UNRECOGNIZED(let i): return i
}
}
Expand All @@ -1814,6 +1820,7 @@ struct Spark_Connect_SubqueryExpression: Sendable {
.scalar,
.exists,
.tableArg,
.in,
]

}
Expand Down Expand Up @@ -4774,6 +4781,7 @@ extension Spark_Connect_SubqueryExpression: SwiftProtobuf.Message, SwiftProtobuf
1: .standard(proto: "plan_id"),
2: .standard(proto: "subquery_type"),
3: .standard(proto: "table_arg_options"),
4: .standard(proto: "in_subquery_values"),
]

mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
Expand All @@ -4785,6 +4793,7 @@ extension Spark_Connect_SubqueryExpression: SwiftProtobuf.Message, SwiftProtobuf
case 1: try { try decoder.decodeSingularInt64Field(value: &self.planID) }()
case 2: try { try decoder.decodeSingularEnumField(value: &self.subqueryType) }()
case 3: try { try decoder.decodeSingularMessageField(value: &self._tableArgOptions) }()
case 4: try { try decoder.decodeRepeatedMessageField(value: &self.inSubqueryValues) }()
default: break
}
}
Expand All @@ -4804,13 +4813,17 @@ extension Spark_Connect_SubqueryExpression: SwiftProtobuf.Message, SwiftProtobuf
try { if let v = self._tableArgOptions {
try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
} }()
if !self.inSubqueryValues.isEmpty {
try visitor.visitRepeatedMessageField(value: self.inSubqueryValues, fieldNumber: 4)
}
try unknownFields.traverse(visitor: &visitor)
}

static func ==(lhs: Spark_Connect_SubqueryExpression, rhs: Spark_Connect_SubqueryExpression) -> Bool {
if lhs.planID != rhs.planID {return false}
if lhs.subqueryType != rhs.subqueryType {return false}
if lhs._tableArgOptions != rhs._tableArgOptions {return false}
if lhs.inSubqueryValues != rhs.inSubqueryValues {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
Expand All @@ -4822,6 +4835,7 @@ extension Spark_Connect_SubqueryExpression.SubqueryType: SwiftProtobuf._ProtoNam
1: .same(proto: "SUBQUERY_TYPE_SCALAR"),
2: .same(proto: "SUBQUERY_TYPE_EXISTS"),
3: .same(proto: "SUBQUERY_TYPE_TABLE_ARG"),
4: .same(proto: "SUBQUERY_TYPE_IN"),
]
}

Expand Down
Loading