Skip to content

Commit c0f0719

Browse files
committed
[SPARK-52472] Regenerate Spark Connect-generated Swift source code with protoc-gen-grpc-swift-2
### What changes were proposed in this pull request? This PR aims to regenerate `Spark Connect`-generated Swift source code with `protoc-gen-grpc-swift-2`. - https://formulae.brew.sh/formula/protoc-gen-grpc-swift - https://github.com/grpc/grpc-swift-protobuf/releases/tag/2.0.0 ```bash $ which protoc-gen-grpc-swift-2 /opt/homebrew/bin/protoc-gen-grpc-swift-2 ``` ### Why are the changes needed? These files are manually generated from [v4.0.0](https://github.com/apache/spark/releases/tag/v4.0.0) tag by the following standard procedures. ``` $ git clone -b v4.0.0 https://github.com/apache/spark.git $ cd spark/sql/connect/common/src/main/protobuf/ $ protoc --swift_out=. spark/connect/*.proto $ protoc --grpc-swift_out=. spark/connect/*.proto // Remove empty GRPC files $ git grep 'This file contained no services' spark/connect/catalog.grpc.swift:// This file contained no services. spark/connect/commands.grpc.swift:// This file contained no services. spark/connect/common.grpc.swift:// This file contained no services. spark/connect/example_plugins.grpc.swift:// This file contained no services. spark/connect/expressions.grpc.swift:// This file contained no services. spark/connect/ml.grpc.swift:// This file contained no services. spark/connect/ml_common.grpc.swift:// This file contained no services. spark/connect/relations.grpc.swift:// This file contained no services. spark/connect/types.grpc.swift:// This file contained no services. ``` ### 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 #198 from dongjoon-hyun/SPARK-52472. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent 80985b1 commit c0f0719

File tree

6 files changed

+15
-275
lines changed

6 files changed

+15
-275
lines changed

Sources/SparkConnect/base.grpc.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import SwiftProtobuf
3131
// MARK: - spark.connect.SparkConnectService
3232

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

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

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

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

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

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

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

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

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

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

20982106
// Helpers providing sugared APIs for 'ClientProtocol' methods.
2107+
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
20992108
extension Spark_Connect_SparkConnectService.ClientProtocol {
21002109
/// Call the "ExecutePlan" method.
21012110
///

Sources/SparkConnect/base.pb.swift

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3123,15 +3123,11 @@ extension Spark_Connect_AnalyzePlanRequest: SwiftProtobuf.Message, SwiftProtobuf
31233123
var _clientType: String? = nil
31243124
var _analyze: Spark_Connect_AnalyzePlanRequest.OneOf_Analyze?
31253125

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

31363132
private init() {}
31373133

@@ -3751,15 +3747,11 @@ extension Spark_Connect_AnalyzePlanRequest.SameSemantics: SwiftProtobuf.Message,
37513747
var _targetPlan: Spark_Connect_Plan? = nil
37523748
var _otherPlan: Spark_Connect_Plan? = nil
37533749

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

37643756
private init() {}
37653757

@@ -4766,15 +4758,11 @@ extension Spark_Connect_ExecutePlanRequest: SwiftProtobuf.Message, SwiftProtobuf
47664758
var _requestOptions: [Spark_Connect_ExecutePlanRequest.RequestOption] = []
47674759
var _tags: [String] = []
47684760

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

47794767
private init() {}
47804768

Sources/SparkConnect/commands.pb.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2684,15 +2684,11 @@ extension Spark_Connect_WriteStreamOperationStart: SwiftProtobuf.Message, SwiftP
26842684
var _foreachBatch: Spark_Connect_StreamingForeachFunction? = nil
26852685
var _clusteringColumnNames: [String] = []
26862686

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

26972693
private init() {}
26982694

Sources/SparkConnect/expressions.pb.swift

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1887,15 +1887,11 @@ extension Spark_Connect_Expression: SwiftProtobuf.Message, SwiftProtobuf._Messag
18871887
var _common: Spark_Connect_ExpressionCommon? = nil
18881888
var _exprType: Spark_Connect_Expression.OneOf_ExprType?
18891889

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

19001896
private init() {}
19011897

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

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

23472339
private init() {}
23482340

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

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

24452433
private init() {}
24462434

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

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

25432527
private init() {}
25442528

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

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

26632643
private init() {}
26642644

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

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

27722748
private init() {}
27732749

@@ -3824,15 +3800,11 @@ extension Spark_Connect_Expression.UnresolvedExtractValue: SwiftProtobuf.Message
38243800
var _child: Spark_Connect_Expression? = nil
38253801
var _extraction: Spark_Connect_Expression? = nil
38263802

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

38373809
private init() {}
38383810

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

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

39233891
private init() {}
39243892

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

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

40153979
private init() {}
40163980

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

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

41054065
private init() {}
41064066

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

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

46114567
private init() {}
46124568

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

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

46974649
private init() {}
46984650

0 commit comments

Comments
 (0)