| 51 | }; |
| 52 | |
| 53 | Status GetBatchForFlight(const Ticket& ticket, std::shared_ptr<RecordBatchReader>* out) { |
| 54 | if (ticket.ticket == "ticket-ints-1") { |
| 55 | RecordBatchVector batches; |
| 56 | RETURN_NOT_OK(ExampleIntBatches(&batches)); |
| 57 | ARROW_ASSIGN_OR_RAISE(*out, RecordBatchReader::Make(batches)); |
| 58 | return Status::OK(); |
| 59 | } else if (ticket.ticket == "ticket-floats-1") { |
| 60 | RecordBatchVector batches; |
| 61 | RETURN_NOT_OK(ExampleFloatBatches(&batches)); |
| 62 | ARROW_ASSIGN_OR_RAISE(*out, RecordBatchReader::Make(batches)); |
| 63 | return Status::OK(); |
| 64 | } else if (ticket.ticket == "ticket-dicts-1") { |
| 65 | RecordBatchVector batches; |
| 66 | RETURN_NOT_OK(ExampleDictBatches(&batches)); |
| 67 | ARROW_ASSIGN_OR_RAISE(*out, RecordBatchReader::Make(batches)); |
| 68 | return Status::OK(); |
| 69 | } else if (ticket.ticket == "ticket-large-batch-1") { |
| 70 | RecordBatchVector batches; |
| 71 | RETURN_NOT_OK(ExampleLargeBatches(&batches)); |
| 72 | ARROW_ASSIGN_OR_RAISE(*out, RecordBatchReader::Make(batches)); |
| 73 | return Status::OK(); |
| 74 | } else { |
| 75 | return Status::NotImplemented("no stream implemented for ticket: " + ticket.ticket); |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | } // namespace |
| 80 |
no test coverage detected