| 334 | } |
| 335 | |
| 336 | std::string namesAndTypesToString( |
| 337 | const std::vector<std::string>& names, |
| 338 | const std::vector<TypePtr>& types) { |
| 339 | std::stringstream ss; |
| 340 | ss << "[names: {"; |
| 341 | if (!names.empty()) { |
| 342 | for (const auto& name : names) { |
| 343 | ss << "'" << name << "', "; |
| 344 | } |
| 345 | ss.seekp(-2, std::ios_base::cur); |
| 346 | } else { |
| 347 | ss << " "; |
| 348 | } |
| 349 | ss << "}, types: {"; |
| 350 | if (!types.empty()) { |
| 351 | for (const auto& type : types) { |
| 352 | ss << (type ? type->toString() : "NULL") << ", "; |
| 353 | } |
| 354 | ss.seekp(-2, std::ios_base::cur); |
| 355 | } else { |
| 356 | ss << " "; |
| 357 | } |
| 358 | ss << "}]"; |
| 359 | return ss.str(); |
| 360 | } |
| 361 | |
| 362 | } // namespace |
| 363 | |