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

Method GetFlightInfo

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

Source from the content-addressed store, hash-verified

95}
96
97Status TestFlightServer::GetFlightInfo(const ServerCallContext& context,
98 const FlightDescriptor& request,
99 std::unique_ptr<FlightInfo>* out) {
100 // Test that Arrow-C++ status codes make it through the transport
101 if (request.type == FlightDescriptor::DescriptorType::CMD &&
102 request.cmd == "status-outofmemory") {
103 return Status::OutOfMemory("Sentinel");
104 }
105
106 std::vector<FlightInfo> flights = ExampleFlightInfo();
107
108 for (const auto& info : flights) {
109 if (info.descriptor().Equals(request)) {
110 *out = std::make_unique<FlightInfo>(info);
111 return Status::OK();
112 }
113 }
114 return Status::Invalid("Flight not found: ", request.ToString());
115}
116
117Status TestFlightServer::DoGet(const ServerCallContext& context, const Ticket& request,
118 std::unique_ptr<FlightDataStream>* data_stream) {

Callers

nothing calls this directly

Calls 6

OutOfMemoryFunction · 0.85
ExampleFlightInfoFunction · 0.85
OKFunction · 0.50
InvalidFunction · 0.50
EqualsMethod · 0.45
ToStringMethod · 0.45

Tested by

no test coverage detected