| 1031 | } |
| 1032 | |
| 1033 | arrow::Result<std::unique_ptr<FlightInfo>> FlightSqlServerBase::GetFlightInfoSqlInfo( |
| 1034 | const ServerCallContext& context, const GetSqlInfo& command, |
| 1035 | const FlightDescriptor& descriptor) { |
| 1036 | if (sql_info_id_to_result_.empty()) { |
| 1037 | return Status::KeyError("No SQL information available."); |
| 1038 | } |
| 1039 | |
| 1040 | std::vector<FlightEndpoint> endpoints{ |
| 1041 | FlightEndpoint{Ticket{descriptor.cmd}, {}, std::nullopt, {}}}; |
| 1042 | ARROW_ASSIGN_OR_RAISE( |
| 1043 | auto result, FlightInfo::Make(*SqlSchema::GetSqlInfoSchema(), descriptor, endpoints, |
| 1044 | -1, -1, false)) |
| 1045 | |
| 1046 | return std::make_unique<FlightInfo>(result); |
| 1047 | } |
| 1048 | |
| 1049 | arrow::Result<std::unique_ptr<FlightInfo>> FlightSqlServerBase::GetFlightInfoXdbcTypeInfo( |
| 1050 | const ServerCallContext& context, const GetXdbcTypeInfo& command, |