Skip to content

Commit ba31dc1

Browse files
committed
Apply solution from #49436
1 parent 4dd559c commit ba31dc1

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

cpp/src/arrow/flight/sql/server.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,13 @@ arrow::Result<std::string> CreateStatementQueryTicket(
537537
ticket_statement_query.set_statement_handle(statement_handle);
538538

539539
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
540545
ticket.PackFrom(ticket_statement_query);
546+
#endif
541547

542548
std::string ticket_string;
543549

0 commit comments

Comments
 (0)