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

Method collectFuzzInfoRecurse

programs/client/QueryFuzzer.cpp:607–644  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

605}
606
607void QueryFuzzer::collectFuzzInfoRecurse(const ASTPtr ast)
608{
609 if (auto * impl = dynamic_cast<ASTWithAlias *>(ast.get()))
610 {
611 if (aliases_set.size() > 1000)
612 {
613 aliases_set.clear();
614 }
615
616 aliases_set.insert(impl->alias);
617 }
618
619 if (typeid_cast<ASTLiteral *>(ast.get()))
620 {
621 addColumnLike(ast);
622 }
623 else if (typeid_cast<ASTIdentifier *>(ast.get()))
624 {
625 addColumnLike(ast);
626 }
627 else if (typeid_cast<ASTFunction *>(ast.get()))
628 {
629 addColumnLike(ast);
630 }
631 else if (typeid_cast<ASTTableExpression *>(ast.get()))
632 {
633 addTableLike(ast);
634 }
635 else if (typeid_cast<ASTSubquery *>(ast.get()))
636 {
637 addTableLike(ast);
638 }
639
640 for (const auto & child : ast->children)
641 {
642 collectFuzzInfoRecurse(child);
643 }
644}
645
646void QueryFuzzer::fuzzMain(ASTPtr & ast)
647{

Callers

nothing calls this directly

Calls 4

getMethod · 0.45
sizeMethod · 0.45
clearMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected