1919import Foundation
2020
2121public struct Row : Sendable , Equatable {
22- let values : [ Sendable ? ]
22+ let values : [ Sendable ? ]
2323
2424 public init ( _ values: Sendable ? ... ) {
2525 self . values = values
@@ -30,14 +30,12 @@ public struct Row: Sendable, Equatable {
3030 }
3131
3232 public static var empty : Row {
33- get {
34- return Row ( )
35- }
33+ return Row ( )
3634 }
3735
38- public var size : Int { get { return length } }
36+ public var size : Int { return length }
3937
40- public var length : Int { get { return values. count } }
38+ public var length : Int { return values. count }
4139
4240 subscript( index: Int ) -> Sendable {
4341 get throws {
@@ -46,21 +44,21 @@ public struct Row: Sendable, Equatable {
4644 }
4745
4846 public func get( _ i: Int ) throws -> Sendable {
49- if ( i < 0 || i >= self . length) {
47+ if i < 0 || i >= self . length {
5048 throw SparkConnectError . InvalidArgumentException
5149 }
5250 return values [ i]
5351 }
5452
5553 public static func == ( lhs: Row , rhs: Row ) -> Bool {
56- if ( lhs. values. count != rhs. values. count) {
54+ if lhs. values. count != rhs. values. count {
5755 return false
5856 }
5957 return lhs. values. elementsEqual ( rhs. values) { ( x, y) in
6058 if x == nil && y == nil {
6159 return true
6260 } else if let a = x as? Bool , let b = y as? Bool {
63- return a == b
61+ return a == b
6462 } else if let a = x as? Int , let b = y as? Int {
6563 return a == b
6664 } else if let a = x as? Int8 , let b = y as? Int8 {
@@ -72,11 +70,11 @@ public struct Row: Sendable, Equatable {
7270 } else if let a = x as? Int64 , let b = y as? Int64 {
7371 return a == b
7472 } else if let a = x as? Float , let b = y as? Float {
75- return a == b
73+ return a == b
7674 } else if let a = x as? Double , let b = y as? Double {
77- return a == b
75+ return a == b
7876 } else if let a = x as? String , let b = y as? String {
79- return a == b
77+ return a == b
8078 } else {
8179 return false
8280 }
0 commit comments