This is an automated email from the ASF dual-hosted git repository. raulcd pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/arrow-swift.git
commit afe585d2bae24a83fde56d1a87b0ae9bcb169384 Author: Josh Soref <[email protected]> AuthorDate: Tue Nov 28 19:25:36 2023 -0500 GH-38938: [FlightRPC] Fix spelling (#38939) ### Rationale for this change ### What changes are included in this PR? Spelling fixes to *flight* ### Are these changes tested? ### Are there any user-facing changes? * Closes: #38938 Authored-by: Josh Soref <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]> --- ArrowFlight/Sources/ArrowFlight/FlightClient.swift | 22 +++++++++++----------- ArrowFlight/Sources/ArrowFlight/FlightSql.pb.swift | 22 +++++++++++----------- .../Tests/ArrowFlightTests/FlightTest.swift | 4 ++-- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/ArrowFlight/Sources/ArrowFlight/FlightClient.swift b/ArrowFlight/Sources/ArrowFlight/FlightClient.swift index ca50586..7a572ce 100644 --- a/ArrowFlight/Sources/ArrowFlight/FlightClient.swift +++ b/ArrowFlight/Sources/ArrowFlight/FlightClient.swift @@ -48,17 +48,17 @@ public class FlightClient { private func writeBatches( _ requestStream: GRPCAsyncRequestStreamWriter<Arrow_Flight_Protocol_FlightData>, descriptor: FlightDescriptor, - recordBatchs: [RecordBatch] + recordBatches: [RecordBatch] ) async throws { let writer = ArrowWriter() - switch writer.toMessage(recordBatchs[0].schema) { + switch writer.toMessage(recordBatches[0].schema) { case .success(let schemaData): try await requestStream.send( FlightData( schemaData, dataBody: Data(), flightDescriptor: descriptor).toProtocol()) - for recordBatch in recordBatchs { + for recordBatch in recordBatches { switch writer.toMessage(recordBatch) { case .success(let data): try await requestStream.send( @@ -122,14 +122,14 @@ public class FlightClient { public func doPut( _ descriptor: FlightDescriptor, - recordBatchs: [RecordBatch], + recordBatches: [RecordBatch], closure: (FlightPutResult) throws -> Void) async throws { - if recordBatchs.isEmpty { + if recordBatches.isEmpty { throw ArrowFlightError.emptyCollection } let putCall = client.makeDoPutCall() - try await writeBatches(putCall.requestStream, descriptor: descriptor, recordBatchs: recordBatchs) + try await writeBatches(putCall.requestStream, descriptor: descriptor, recordBatches: recordBatches) var closureCalled = false for try await response in putCall.responseStream { try closure(FlightPutResult(response)) @@ -158,20 +158,20 @@ public class FlightClient { public func doExchange( _ descriptor: FlightDescriptor, - recordBatchs: [RecordBatch], + recordBatches: [RecordBatch], closure: (ArrowReader.ArrowReaderResult) throws -> Void) async throws { - if recordBatchs.isEmpty { + if recordBatches.isEmpty { throw ArrowFlightError.emptyCollection } let exchangeCall = client.makeDoExchangeCall() - try await writeBatches(exchangeCall.requestStream, descriptor: descriptor, recordBatchs: recordBatchs) + try await writeBatches(exchangeCall.requestStream, descriptor: descriptor, recordBatches: recordBatches) try closure(try await readMessages(exchangeCall.responseStream)) } - public func doExchange(fligthData: FlightData, closure: (FlightData) throws -> Void) async throws { + public func doExchange(flightData: FlightData, closure: (FlightData) throws -> Void) async throws { let exchangeCall = client.makeDoExchangeCall() - try await exchangeCall.requestStream.send(fligthData.toProtocol()) + try await exchangeCall.requestStream.send(flightData.toProtocol()) exchangeCall.requestStream.finish() for try await response in exchangeCall.responseStream { try closure(FlightData(response)) diff --git a/ArrowFlight/Sources/ArrowFlight/FlightSql.pb.swift b/ArrowFlight/Sources/ArrowFlight/FlightSql.pb.swift index 2380922..18b839f 100644 --- a/ArrowFlight/Sources/ArrowFlight/FlightSql.pb.swift +++ b/ArrowFlight/Sources/ArrowFlight/FlightSql.pb.swift @@ -476,7 +476,7 @@ enum Arrow_Flight_Protocol_Sql_SqlInfo: SwiftProtobuf.Enum { /// Retrieves a int64 value representing the maximum number of characters allowed for a column name. case sqlMaxColumnNameLength // = 543 - /// Retrieves a int64 value representing the the maximum number of columns allowed in a GROUP BY clause. + /// Retrieves a int64 value representing the maximum number of columns allowed in a GROUP BY clause. case sqlMaxColumnsInGroupBy // = 544 /// Retrieves a int64 value representing the maximum number of columns allowed in an index. @@ -1816,7 +1816,7 @@ extension Arrow_Flight_Protocol_Sql_SqlSupportsConvert: CaseIterable { ///* /// The JDBC/ODBC-defined type of any object. -/// All the values here are the sames as in the JDBC and ODBC specs. +/// All the values here are the same as in the JDBC and ODBC specs. enum Arrow_Flight_Protocol_Sql_XdbcDataType: SwiftProtobuf.Enum { typealias RawValue = Int case xdbcUnknownType // = 0 @@ -2104,7 +2104,7 @@ enum Arrow_Flight_Protocol_Sql_Nullable: SwiftProtobuf.Enum { case nullabilityNullable // = 1 ///* - /// Indicates that nullability of the fields can not be determined. + /// Indicates that nullability of the fields cannot be determined. case nullabilityUnknown // = 2 case UNRECOGNIZED(Int) @@ -2149,7 +2149,7 @@ enum Arrow_Flight_Protocol_Sql_Searchable: SwiftProtobuf.Enum { typealias RawValue = Int ///* - /// Indicates that column can not be used in a WHERE clause. + /// Indicates that column cannot be used in a WHERE clause. case none // = 0 ///* @@ -2489,7 +2489,7 @@ struct Arrow_Flight_Protocol_Sql_CommandGetDbSchemas { /// - ARROW:FLIGHT:SQL:PRECISION - Column precision/size /// - ARROW:FLIGHT:SQL:SCALE - Column scale/decimal digits if applicable /// - ARROW:FLIGHT:SQL:IS_AUTO_INCREMENT - "1" indicates if the column is auto incremented, "0" otherwise. -/// - ARROW:FLIGHT:SQL:IS_CASE_SENSITIVE - "1" indicates if the column is case sensitive, "0" otherwise. +/// - ARROW:FLIGHT:SQL:IS_CASE_SENSITIVE - "1" indicates if the column is case-sensitive, "0" otherwise. /// - ARROW:FLIGHT:SQL:IS_READ_ONLY - "1" indicates if the column is read only, "0" otherwise. /// - ARROW:FLIGHT:SQL:IS_SEARCHABLE - "1" indicates if the column is searchable via WHERE clause, "0" otherwise. /// The returned data should be ordered by catalog_name, db_schema_name, table_name, then table_type, followed by table_schema if requested. @@ -3249,7 +3249,7 @@ extension Arrow_Flight_Protocol_Sql_ActionEndSavepointRequest.EndSavepoint: Case /// - ARROW:FLIGHT:SQL:PRECISION - Column precision/size /// - ARROW:FLIGHT:SQL:SCALE - Column scale/decimal digits if applicable /// - ARROW:FLIGHT:SQL:IS_AUTO_INCREMENT - "1" indicates if the column is auto incremented, "0" otherwise. -/// - ARROW:FLIGHT:SQL:IS_CASE_SENSITIVE - "1" indicates if the column is case sensitive, "0" otherwise. +/// - ARROW:FLIGHT:SQL:IS_CASE_SENSITIVE - "1" indicates if the column is case-sensitive, "0" otherwise. /// - ARROW:FLIGHT:SQL:IS_READ_ONLY - "1" indicates if the column is read only, "0" otherwise. /// - ARROW:FLIGHT:SQL:IS_SEARCHABLE - "1" indicates if the column is searchable via WHERE clause, "0" otherwise. /// - GetFlightInfo: execute the query. @@ -3290,7 +3290,7 @@ struct Arrow_Flight_Protocol_Sql_CommandStatementQuery { /// - ARROW:FLIGHT:SQL:PRECISION - Column precision/size /// - ARROW:FLIGHT:SQL:SCALE - Column scale/decimal digits if applicable /// - ARROW:FLIGHT:SQL:IS_AUTO_INCREMENT - "1" indicates if the column is auto incremented, "0" otherwise. -/// - ARROW:FLIGHT:SQL:IS_CASE_SENSITIVE - "1" indicates if the column is case sensitive, "0" otherwise. +/// - ARROW:FLIGHT:SQL:IS_CASE_SENSITIVE - "1" indicates if the column is case-sensitive, "0" otherwise. /// - ARROW:FLIGHT:SQL:IS_READ_ONLY - "1" indicates if the column is read only, "0" otherwise. /// - ARROW:FLIGHT:SQL:IS_SEARCHABLE - "1" indicates if the column is searchable via WHERE clause, "0" otherwise. /// - GetFlightInfo: execute the query. @@ -3356,7 +3356,7 @@ struct Arrow_Flight_Protocol_Sql_TicketStatementQuery { /// - ARROW:FLIGHT:SQL:PRECISION - Column precision/size /// - ARROW:FLIGHT:SQL:SCALE - Column scale/decimal digits if applicable /// - ARROW:FLIGHT:SQL:IS_AUTO_INCREMENT - "1" indicates if the column is auto incremented, "0" otherwise. -/// - ARROW:FLIGHT:SQL:IS_CASE_SENSITIVE - "1" indicates if the column is case sensitive, "0" otherwise. +/// - ARROW:FLIGHT:SQL:IS_CASE_SENSITIVE - "1" indicates if the column is case-sensitive, "0" otherwise. /// - ARROW:FLIGHT:SQL:IS_READ_ONLY - "1" indicates if the column is read only, "0" otherwise. /// - ARROW:FLIGHT:SQL:IS_SEARCHABLE - "1" indicates if the column is searchable via WHERE clause, "0" otherwise. /// - DoPut: bind parameter values. All of the bound parameter sets will be executed as a single atomic execution. @@ -3376,7 +3376,7 @@ struct Arrow_Flight_Protocol_Sql_CommandPreparedStatementQuery { /// /// Represents a SQL update query. Used in the command member of FlightDescriptor -/// for the the RPC call DoPut to cause the server to execute the included SQL update. +/// for the RPC call DoPut to cause the server to execute the included SQL update. struct Arrow_Flight_Protocol_Sql_CommandStatementUpdate { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -3404,7 +3404,7 @@ struct Arrow_Flight_Protocol_Sql_CommandStatementUpdate { /// /// Represents a SQL update query. Used in the command member of FlightDescriptor -/// for the the RPC call DoPut to cause the server to execute the included +/// for the RPC call DoPut to cause the server to execute the included /// prepared statement handle as an update. struct Arrow_Flight_Protocol_Sql_CommandPreparedStatementUpdate { // SwiftProtobuf.Message conformance is added in an extension below. See the @@ -3611,7 +3611,7 @@ extension Arrow_Flight_Protocol_Sql_ActionCancelQueryResult.CancelResult: @unche // MARK: - Extension Properties -// Swift Extensions on the exteneded Messages to add easy access to the declared +// Swift Extensions on the extended Messages to add easy access to the declared // extension fields. The names are based on the extension field name from the proto // declaration. To avoid naming collisions, the names are prefixed with the name of // the scope where the extend directive occurs. diff --git a/ArrowFlight/Tests/ArrowFlightTests/FlightTest.swift b/ArrowFlight/Tests/ArrowFlightTests/FlightTest.swift index db33dfc..8097388 100644 --- a/ArrowFlight/Tests/ArrowFlightTests/FlightTest.swift +++ b/ArrowFlight/Tests/ArrowFlightTests/FlightTest.swift @@ -278,7 +278,7 @@ public class FlightClientTester { let descriptor = FlightDescriptor(cmd: cmd.data(using: .utf8)!) let rb = try makeRecordBatch() var numCall = 0 - try await client?.doPut(descriptor, recordBatchs: [rb], closure: { _ in + try await client?.doPut(descriptor, recordBatches: [rb], closure: { _ in numCall += 1 }) @@ -289,7 +289,7 @@ public class FlightClientTester { let descriptor = FlightDescriptor(cmd: "flight_ticket".data(using: .utf8)!) let rb = try makeRecordBatch() var numCall = 0 - try await client?.doExchange(descriptor, recordBatchs: [rb], closure: { result in + try await client?.doExchange(descriptor, recordBatches: [rb], closure: { result in numCall += 1 XCTAssertEqual(result.schema?.fields.count, 3) XCTAssertEqual(result.batches[0].length, 4)
