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

Function ParseCommandGetSqlInfo

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

Source from the content-addressed store, hash-verified

102}
103
104arrow::Result<GetSqlInfo> ParseCommandGetSqlInfo(
105 const google::protobuf::Any& any, const SqlInfoResultMap& sql_info_id_to_result) {
106 pb::sql::CommandGetSqlInfo command;
107 if (!any.UnpackTo(&command)) {
108 return Status::Invalid("Unable to unpack CommandGetSqlInfo.");
109 }
110
111 GetSqlInfo result;
112 if (command.info_size() > 0) {
113 result.info.reserve(command.info_size());
114 result.info.assign(command.info().begin(), command.info().end());
115 } else {
116 result.info.reserve(sql_info_id_to_result.size());
117 for (const auto& it : sql_info_id_to_result) {
118 result.info.push_back(it.first);
119 }
120 }
121 return result;
122}
123
124arrow::Result<GetDbSchemas> ParseCommandGetDbSchemas(const google::protobuf::Any& any) {
125 pb::sql::CommandGetDbSchemas command;

Callers

nothing calls this directly

Calls 8

assignMethod · 0.80
push_backMethod · 0.80
InvalidFunction · 0.50
reserveMethod · 0.45
beginMethod · 0.45
infoMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected