Skip to content

[SPARK-52472] Regenerate Spark Connect-generated Swift source code with protoc-gen-grpc-swift-2 #198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
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
9 changes: 9 additions & 0 deletions Sources/SparkConnect/base.grpc.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import SwiftProtobuf
// MARK: - spark.connect.SparkConnectService

/// Namespace containing generated types for the "spark.connect.SparkConnectService" service.
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
internal enum Spark_Connect_SparkConnectService {
/// Service descriptor for the "spark.connect.SparkConnectService" service.
internal static let descriptor = GRPCCore.ServiceDescriptor(fullyQualifiedService: "spark.connect.SparkConnectService")
Expand Down Expand Up @@ -172,13 +173,15 @@ internal enum Spark_Connect_SparkConnectService {
}
}

@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
extension GRPCCore.ServiceDescriptor {
/// Service descriptor for the "spark.connect.SparkConnectService" service.
internal static let spark_connect_SparkConnectService = GRPCCore.ServiceDescriptor(fullyQualifiedService: "spark.connect.SparkConnectService")
}

// MARK: spark.connect.SparkConnectService (server)

@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
extension Spark_Connect_SparkConnectService {
/// Streaming variant of the service protocol for the "spark.connect.SparkConnectService" service.
///
Expand Down Expand Up @@ -800,6 +803,7 @@ extension Spark_Connect_SparkConnectService {
}

// Default implementation of 'registerMethods(with:)'.
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
extension Spark_Connect_SparkConnectService.StreamingServiceProtocol {
internal func registerMethods<Transport>(with router: inout GRPCCore.RPCRouter<Transport>) where Transport: GRPCCore.ServerTransport {
router.registerHandler(
Expand Down Expand Up @@ -916,6 +920,7 @@ extension Spark_Connect_SparkConnectService.StreamingServiceProtocol {
}

// Default implementation of streaming methods from 'StreamingServiceProtocol'.
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
extension Spark_Connect_SparkConnectService.ServiceProtocol {
internal func executePlan(
request: GRPCCore.StreamingServerRequest<Spark_Connect_ExecutePlanRequest>,
Expand Down Expand Up @@ -1029,6 +1034,7 @@ extension Spark_Connect_SparkConnectService.ServiceProtocol {
}

// Default implementation of methods from 'ServiceProtocol'.
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
extension Spark_Connect_SparkConnectService.SimpleServiceProtocol {
internal func executePlan(
request: GRPCCore.ServerRequest<Spark_Connect_ExecutePlanRequest>,
Expand Down Expand Up @@ -1171,6 +1177,7 @@ extension Spark_Connect_SparkConnectService.SimpleServiceProtocol {

// MARK: spark.connect.SparkConnectService (client)

@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
extension Spark_Connect_SparkConnectService {
/// Generated client protocol for the "spark.connect.SparkConnectService" service.
///
Expand Down Expand Up @@ -1795,6 +1802,7 @@ extension Spark_Connect_SparkConnectService {
}

// Helpers providing default arguments to 'ClientProtocol' methods.
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
extension Spark_Connect_SparkConnectService.ClientProtocol {
/// Call the "ExecutePlan" method.
///
Expand Down Expand Up @@ -2096,6 +2104,7 @@ extension Spark_Connect_SparkConnectService.ClientProtocol {
}

// Helpers providing sugared APIs for 'ClientProtocol' methods.
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
extension Spark_Connect_SparkConnectService.ClientProtocol {
/// Call the "ExecutePlan" method.
///
Expand Down
12 changes: 0 additions & 12 deletions Sources/SparkConnect/base.pb.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3123,15 +3123,11 @@ extension Spark_Connect_AnalyzePlanRequest: SwiftProtobuf.Message, SwiftProtobuf
var _clientType: String? = nil
var _analyze: Spark_Connect_AnalyzePlanRequest.OneOf_Analyze?

#if swift(>=5.10)
// This property is used as the initial default value for new instances of the type.
// The type itself is protecting the reference to its storage via CoW semantics.
// This will force a copy to be made of this reference when the first mutation occurs;
// hence, it is safe to mark this as `nonisolated(unsafe)`.
static nonisolated(unsafe) let defaultInstance = _StorageClass()
#else
static let defaultInstance = _StorageClass()
#endif

private init() {}

Expand Down Expand Up @@ -3751,15 +3747,11 @@ extension Spark_Connect_AnalyzePlanRequest.SameSemantics: SwiftProtobuf.Message,
var _targetPlan: Spark_Connect_Plan? = nil
var _otherPlan: Spark_Connect_Plan? = nil

#if swift(>=5.10)
// This property is used as the initial default value for new instances of the type.
// The type itself is protecting the reference to its storage via CoW semantics.
// This will force a copy to be made of this reference when the first mutation occurs;
// hence, it is safe to mark this as `nonisolated(unsafe)`.
static nonisolated(unsafe) let defaultInstance = _StorageClass()
#else
static let defaultInstance = _StorageClass()
#endif

private init() {}

Expand Down Expand Up @@ -4766,15 +4758,11 @@ extension Spark_Connect_ExecutePlanRequest: SwiftProtobuf.Message, SwiftProtobuf
var _requestOptions: [Spark_Connect_ExecutePlanRequest.RequestOption] = []
var _tags: [String] = []

#if swift(>=5.10)
// This property is used as the initial default value for new instances of the type.
// The type itself is protecting the reference to its storage via CoW semantics.
// This will force a copy to be made of this reference when the first mutation occurs;
// hence, it is safe to mark this as `nonisolated(unsafe)`.
static nonisolated(unsafe) let defaultInstance = _StorageClass()
#else
static let defaultInstance = _StorageClass()
#endif

private init() {}

Expand Down
4 changes: 0 additions & 4 deletions Sources/SparkConnect/commands.pb.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2684,15 +2684,11 @@ extension Spark_Connect_WriteStreamOperationStart: SwiftProtobuf.Message, SwiftP
var _foreachBatch: Spark_Connect_StreamingForeachFunction? = nil
var _clusteringColumnNames: [String] = []

#if swift(>=5.10)
// This property is used as the initial default value for new instances of the type.
// The type itself is protecting the reference to its storage via CoW semantics.
// This will force a copy to be made of this reference when the first mutation occurs;
// hence, it is safe to mark this as `nonisolated(unsafe)`.
static nonisolated(unsafe) let defaultInstance = _StorageClass()
#else
static let defaultInstance = _StorageClass()
#endif

private init() {}

Expand Down
48 changes: 0 additions & 48 deletions Sources/SparkConnect/expressions.pb.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1887,15 +1887,11 @@ extension Spark_Connect_Expression: SwiftProtobuf.Message, SwiftProtobuf._Messag
var _common: Spark_Connect_ExpressionCommon? = nil
var _exprType: Spark_Connect_Expression.OneOf_ExprType?

#if swift(>=5.10)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, wonder why it removed the version check condition.

Copy link
Member Author

@dongjoon-hyun dongjoon-hyun Jun 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's removed because Swift-GRPC supports Swift 5.10+ only now, @viirya .

Swift 6.2 feature freeze was started too and Swift-GRPC will support Swift 6.1+ only when 6.2 is out.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, Apache Spark Connect for Swift starts with Swift 6.0+.

// This property is used as the initial default value for new instances of the type.
// The type itself is protecting the reference to its storage via CoW semantics.
// This will force a copy to be made of this reference when the first mutation occurs;
// hence, it is safe to mark this as `nonisolated(unsafe)`.
static nonisolated(unsafe) let defaultInstance = _StorageClass()
#else
static let defaultInstance = _StorageClass()
#endif

private init() {}

Expand Down Expand Up @@ -2334,15 +2330,11 @@ extension Spark_Connect_Expression.Window: SwiftProtobuf.Message, SwiftProtobuf.
var _orderSpec: [Spark_Connect_Expression.SortOrder] = []
var _frameSpec: Spark_Connect_Expression.Window.WindowFrame? = nil

#if swift(>=5.10)
// This property is used as the initial default value for new instances of the type.
// The type itself is protecting the reference to its storage via CoW semantics.
// This will force a copy to be made of this reference when the first mutation occurs;
// hence, it is safe to mark this as `nonisolated(unsafe)`.
static nonisolated(unsafe) let defaultInstance = _StorageClass()
#else
static let defaultInstance = _StorageClass()
#endif

private init() {}

Expand Down Expand Up @@ -2432,15 +2424,11 @@ extension Spark_Connect_Expression.Window.WindowFrame: SwiftProtobuf.Message, Sw
var _lower: Spark_Connect_Expression.Window.WindowFrame.FrameBoundary? = nil
var _upper: Spark_Connect_Expression.Window.WindowFrame.FrameBoundary? = nil

#if swift(>=5.10)
// This property is used as the initial default value for new instances of the type.
// The type itself is protecting the reference to its storage via CoW semantics.
// This will force a copy to be made of this reference when the first mutation occurs;
// hence, it is safe to mark this as `nonisolated(unsafe)`.
static nonisolated(unsafe) let defaultInstance = _StorageClass()
#else
static let defaultInstance = _StorageClass()
#endif

private init() {}

Expand Down Expand Up @@ -2530,15 +2518,11 @@ extension Spark_Connect_Expression.Window.WindowFrame.FrameBoundary: SwiftProtob
fileprivate class _StorageClass {
var _boundary: Spark_Connect_Expression.Window.WindowFrame.FrameBoundary.OneOf_Boundary?

#if swift(>=5.10)
// This property is used as the initial default value for new instances of the type.
// The type itself is protecting the reference to its storage via CoW semantics.
// This will force a copy to be made of this reference when the first mutation occurs;
// hence, it is safe to mark this as `nonisolated(unsafe)`.
static nonisolated(unsafe) let defaultInstance = _StorageClass()
#else
static let defaultInstance = _StorageClass()
#endif

private init() {}

Expand Down Expand Up @@ -2650,15 +2634,11 @@ extension Spark_Connect_Expression.SortOrder: SwiftProtobuf.Message, SwiftProtob
var _direction: Spark_Connect_Expression.SortOrder.SortDirection = .unspecified
var _nullOrdering: Spark_Connect_Expression.SortOrder.NullOrdering = .sortNullsUnspecified

#if swift(>=5.10)
// This property is used as the initial default value for new instances of the type.
// The type itself is protecting the reference to its storage via CoW semantics.
// This will force a copy to be made of this reference when the first mutation occurs;
// hence, it is safe to mark this as `nonisolated(unsafe)`.
static nonisolated(unsafe) let defaultInstance = _StorageClass()
#else
static let defaultInstance = _StorageClass()
#endif

private init() {}

Expand Down Expand Up @@ -2759,15 +2739,11 @@ extension Spark_Connect_Expression.Cast: SwiftProtobuf.Message, SwiftProtobuf._M
var _castToType: Spark_Connect_Expression.Cast.OneOf_CastToType?
var _evalMode: Spark_Connect_Expression.Cast.EvalMode = .unspecified

#if swift(>=5.10)
// This property is used as the initial default value for new instances of the type.
// The type itself is protecting the reference to its storage via CoW semantics.
// This will force a copy to be made of this reference when the first mutation occurs;
// hence, it is safe to mark this as `nonisolated(unsafe)`.
static nonisolated(unsafe) let defaultInstance = _StorageClass()
#else
static let defaultInstance = _StorageClass()
#endif

private init() {}

Expand Down Expand Up @@ -3824,15 +3800,11 @@ extension Spark_Connect_Expression.UnresolvedExtractValue: SwiftProtobuf.Message
var _child: Spark_Connect_Expression? = nil
var _extraction: Spark_Connect_Expression? = nil

#if swift(>=5.10)
// This property is used as the initial default value for new instances of the type.
// The type itself is protecting the reference to its storage via CoW semantics.
// This will force a copy to be made of this reference when the first mutation occurs;
// hence, it is safe to mark this as `nonisolated(unsafe)`.
static nonisolated(unsafe) let defaultInstance = _StorageClass()
#else
static let defaultInstance = _StorageClass()
#endif

private init() {}

Expand Down Expand Up @@ -3910,15 +3882,11 @@ extension Spark_Connect_Expression.UpdateFields: SwiftProtobuf.Message, SwiftPro
var _fieldName: String = String()
var _valueExpression: Spark_Connect_Expression? = nil

#if swift(>=5.10)
// This property is used as the initial default value for new instances of the type.
// The type itself is protecting the reference to its storage via CoW semantics.
// This will force a copy to be made of this reference when the first mutation occurs;
// hence, it is safe to mark this as `nonisolated(unsafe)`.
static nonisolated(unsafe) let defaultInstance = _StorageClass()
#else
static let defaultInstance = _StorageClass()
#endif

private init() {}

Expand Down Expand Up @@ -4002,15 +3970,11 @@ extension Spark_Connect_Expression.Alias: SwiftProtobuf.Message, SwiftProtobuf._
var _name: [String] = []
var _metadata: String? = nil

#if swift(>=5.10)
// This property is used as the initial default value for new instances of the type.
// The type itself is protecting the reference to its storage via CoW semantics.
// This will force a copy to be made of this reference when the first mutation occurs;
// hence, it is safe to mark this as `nonisolated(unsafe)`.
static nonisolated(unsafe) let defaultInstance = _StorageClass()
#else
static let defaultInstance = _StorageClass()
#endif

private init() {}

Expand Down Expand Up @@ -4092,15 +4056,11 @@ extension Spark_Connect_Expression.LambdaFunction: SwiftProtobuf.Message, SwiftP
var _function: Spark_Connect_Expression? = nil
var _arguments: [Spark_Connect_Expression.UnresolvedNamedLambdaVariable] = []

#if swift(>=5.10)
// This property is used as the initial default value for new instances of the type.
// The type itself is protecting the reference to its storage via CoW semantics.
// This will force a copy to be made of this reference when the first mutation occurs;
// hence, it is safe to mark this as `nonisolated(unsafe)`.
static nonisolated(unsafe) let defaultInstance = _StorageClass()
#else
static let defaultInstance = _StorageClass()
#endif

private init() {}

Expand Down Expand Up @@ -4598,15 +4558,11 @@ extension Spark_Connect_NamedArgumentExpression: SwiftProtobuf.Message, SwiftPro
var _key: String = String()
var _value: Spark_Connect_Expression? = nil

#if swift(>=5.10)
// This property is used as the initial default value for new instances of the type.
// The type itself is protecting the reference to its storage via CoW semantics.
// This will force a copy to be made of this reference when the first mutation occurs;
// hence, it is safe to mark this as `nonisolated(unsafe)`.
static nonisolated(unsafe) let defaultInstance = _StorageClass()
#else
static let defaultInstance = _StorageClass()
#endif

private init() {}

Expand Down Expand Up @@ -4684,15 +4640,11 @@ extension Spark_Connect_MergeAction: SwiftProtobuf.Message, SwiftProtobuf._Messa
var _condition: Spark_Connect_Expression? = nil
var _assignments: [Spark_Connect_MergeAction.Assignment] = []

#if swift(>=5.10)
// This property is used as the initial default value for new instances of the type.
// The type itself is protecting the reference to its storage via CoW semantics.
// This will force a copy to be made of this reference when the first mutation occurs;
// hence, it is safe to mark this as `nonisolated(unsafe)`.
static nonisolated(unsafe) let defaultInstance = _StorageClass()
#else
static let defaultInstance = _StorageClass()
#endif

private init() {}

Expand Down
Loading
Loading