abandy commented on issue #37726:
URL: https://github.com/apache/arrow/issues/37726#issuecomment-1721719949

   Hi @mgrazianoc, it looks like a test for calling doGet with a 
flightDataClosure is missing.  I will submit a PR to add the missing test case. 
 In the meantime, here is the test code for getting the data from the 
flightDataClosure into a RecordBatch.
   
   `    
   func doGetTestFlightData() async throws {
           let ticket = FlightTicket("flight_ticket test".data(using: .utf8)!)
           var num_call = 0
           try await client?.doGet(ticket, flightDataClosure: { flightData in
               let reader = ArrowReader();
               let result = reader.fromStream(flightData.dataBody)
               switch result {
               case .success(let rb):
                   XCTAssertEqual(rb.schema?.fields.count, 3)
                   XCTAssertEqual(rb.batches[0].length, 4)
                   num_call += 1
               case .failure(let error):
                   throw error
               }
           })
           
           XCTAssertEqual(num_call, 1)
       }
   `
   Once you have the record batches you should be able to call 
ArrowTable.from(recordBatchs: [RecordBatch]) to build the ArrowTable.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to