| 385 | } |
| 386 | |
| 387 | std::vector<std::string> TestRunner::convertResultToString(QueryResult& queryResult, |
| 388 | bool checkOutputOrder, bool checkColumnNames) { |
| 389 | std::vector<std::string> actualOutput; |
| 390 | if (checkColumnNames) { |
| 391 | actualOutput.push_back(convertResultColumnsToString(queryResult)); |
| 392 | } |
| 393 | while (queryResult.hasNext()) { |
| 394 | const auto tuple = queryResult.getNext(); |
| 395 | actualOutput.push_back(tuple->toString(std::vector<uint32_t>(tuple->len(), 0))); |
| 396 | } |
| 397 | if (!checkOutputOrder) { |
| 398 | std::ranges::sort(actualOutput); |
| 399 | // NOTE: If you wish to change this sorting in a |
| 400 | // way that alters its result, you may break existing |
| 401 | // hashed test cases |
| 402 | } |
| 403 | return actualOutput; |
| 404 | } |
| 405 | |
| 406 | std::string TestRunner::convertResultToMD5Hash(QueryResult& queryResult, bool checkOutputOrder, |
| 407 | bool checkColumnNames) { |