https://clickhouse-test-reports.s3.yandex.net/18817/9049599e367bcccd809f45af138452f965b3303a/stress_test_(thread)/test_run.txt.out.log


{
    auto res = std::make_shared<ASTExpressionList>();
    for (const MutationCommand & command : *this)
        res->children.push_back(command.ast->clone());
    return res;
}
void MutationCommands::writeText(WriteBuffer & out) const
{
    WriteBufferFromOwnString commands_buf;
    formatAST(*ast(), commands_buf,  false,  true);
    out << escape << commands_buf.str();
}
void MutationCommands::readText(ReadBuffer & in)
{
    String commands_str;
    in >> escape >> commands_str;
    ParserAlterCommandList p_alter_commands;
    auto commands_ast = parseQuery(
        p_alter_commands, commands_str.data(), commands_str.data() + commands_str.length(), "mutation commands list", 0, DBMS_DEFAULT_MAX_PARSER_DEPTH);
    for (const auto & child : commands_ast->children)
    {
        auto * command_ast = child->as<ASTAlterCommand>();
        auto command = MutationCommand::parse(command_ast, true);
        if (!command)
            throw Exception("Unknown mutation command type: " + DB::toString<int>(command_ast->type), ErrorCodes::UNKNOWN_MUTATION_COMMAND);
        push_back(std::move(*command));
    }
}
}