MCPcopy Create free account
hub / github.com/ByConity/ByConity / collectFuzzInfoMain

Method collectFuzzInfoMain

programs/client/QueryFuzzer.cpp:547–568  ·  view source on GitHub ↗

* 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

Source from the content-addressed store, hash-verified

545 * problems it can routinely find even in this boring version.
546 */
547void 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
570void QueryFuzzer::addTableLike(const ASTPtr ast)
571{

Callers

nothing calls this directly

Calls 2

clearMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected