This commit is contained in:
flynn 2023-03-23 04:08:36 +00:00
parent dba352274c
commit e7afe0f60f

View File

@ -1105,7 +1105,16 @@ void QueryFuzzer::fuzz(ASTPtr & ast)
}
else if (auto * explain_query = typeid_cast<ASTExplainQuery *>(ast.get()))
{
fuzzExplainQuery(*explain_query);
/// Fuzzing EXPLAIN query to SELECT query randomly
if (fuzz_rand() % 20 == 0 && explain_query->getExplainedQuery()->getQueryKind() == IAST::QueryKind::Select)
{
ast = explain_query->getExplainedQuery();
fuzz(ast);
}
else
{
fuzzExplainQuery(*explain_query);
}
}
else
{