| 174 | } |
| 175 | |
| 176 | static void GetSchemaData( |
| 177 | const std::map<std::string, std::string>& columns_map, |
| 178 | const Schema& schema, Schema& new_schema) { // NOLINT |
| 179 | for (int i = 0; i < schema.size(); i++) { |
| 180 | const ::fedb::common::ColumnDesc& col = schema.Get(i); |
| 181 | const std::string& col_name = col.name(); |
| 182 | auto iter = columns_map.find(col_name); |
| 183 | if (iter != columns_map.end()) { |
| 184 | ::fedb::common::ColumnDesc* tmp = new_schema.Add(); |
| 185 | tmp->CopyFrom(col); |
| 186 | } |
| 187 | } |
| 188 | } |
| 189 | |
| 190 | static fedb::base::ResultMsg GetCdColumns(const Schema& schema, |
| 191 | const std::map<std::string, std::string>& cd_columns_map, |