| 532 | } |
| 533 | |
| 534 | arrow::Result<std::string> CreateStatementQueryTicket( |
| 535 | const std::string& statement_handle) { |
| 536 | protocol::sql::TicketStatementQuery ticket_statement_query; |
| 537 | ticket_statement_query.set_statement_handle(statement_handle); |
| 538 | |
| 539 | google::protobuf::Any ticket; |
| 540 | #if PROTOBUF_VERSION >= 3015000 |
| 541 | if (!ticket.PackFrom(ticket_statement_query)) { |
| 542 | return Status::IOError("Failed to pack ticket"); |
| 543 | } |
| 544 | #else |
| 545 | ticket.PackFrom(ticket_statement_query); |
| 546 | #endif |
| 547 | |
| 548 | std::string ticket_string; |
| 549 | |
| 550 | if (!ticket.SerializeToString(&ticket_string)) { |
| 551 | return Status::IOError("Invalid ticket."); |
| 552 | } |
| 553 | return ticket_string; |
| 554 | } |
| 555 | |
| 556 | Status FlightSqlServerBase::GetFlightInfo(const ServerCallContext& context, |
| 557 | const FlightDescriptor& request, |
no test coverage detected