* This functions collects various parts of query that we can then substitute * to a query being fuzzed. * * TODO: we just stop remembering new parts after our corpus reaches certain size. * This is boring, should implement a random replacement of existing parst with * small probability. Do this after we add this fuzzer to CI and fix all the * problems it can routinely find even in this borin
| 545 | * problems it can routinely find even in this boring version. |
| 546 | */ |
| 547 | void QueryFuzzer::collectFuzzInfoMain(const ASTPtr ast) |
| 548 | { |
| 549 | collectFuzzInfoRecurse(ast); |
| 550 | |
| 551 | aliases.clear(); |
| 552 | for (const auto & alias : aliases_set) |
| 553 | { |
| 554 | aliases.push_back(alias); |
| 555 | } |
| 556 | |
| 557 | column_like.clear(); |
| 558 | for (const auto & [name, value] : column_like_map) |
| 559 | { |
| 560 | column_like.push_back(value); |
| 561 | } |
| 562 | |
| 563 | table_like.clear(); |
| 564 | for (const auto & [name, value] : table_like_map) |
| 565 | { |
| 566 | table_like.push_back(value); |
| 567 | } |
| 568 | } |
| 569 | |
| 570 | void QueryFuzzer::addTableLike(const ASTPtr ast) |
| 571 | { |