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

Function CreateStatementQueryTicket

cpp/src/arrow/flight/sql/server.cc:534–554  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

532}
533
534arrow::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
556Status FlightSqlServerBase::GetFlightInfo(const ServerCallContext& context,
557 const FlightDescriptor& request,

Calls 2

IOErrorFunction · 0.85
SerializeToStringMethod · 0.45

Tested by

no test coverage detected