MCPcopy Create free account
hub / github.com/apache/arrow / GetBatchForFlight

Function GetBatchForFlight

cpp/src/arrow/flight/test_flight_server.cc:53–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51};
52
53Status 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

Callers 1

DoGetMethod · 0.85

Calls 8

ExampleIntBatchesFunction · 0.85
ExampleFloatBatchesFunction · 0.85
ExampleDictBatchesFunction · 0.85
ExampleLargeBatchesFunction · 0.85
ARROW_ASSIGN_OR_RAISEFunction · 0.70
MakeFunction · 0.50
OKFunction · 0.50
NotImplementedFunction · 0.50

Tested by

no test coverage detected