
Clickhouse got stuck and had thrown a coredump
Optimize table process has been started there before the fail


**Does it reproduce on recent release?**

v22.3.6.5-lts

**Error message and/or stacktrace**

https://pastila.nl/?00ea0713/9ad972e00fde60564ff00853050fcc1d

Can't provide the coredump file for NDA reason, but ready to analyse it


{
        if (const auto * ast_function = ast->as<ASTFunction>())
            visit(*ast_function, data);
    }
    static void visit(const ASTFunction & ast_function, Data & data)
    {
        if (data.isRejected())
            return;
        
        if (!ast_function.arguments || ast_function.arguments->children.size() != 1)
        {
            data.reject();
            return;
        }
        if (!data.canOptimize(ast_function))
        {
            data.reject();
            return;
        }
        const auto & function = FunctionFactory::instance().tryGet(ast_function.name, data.context);
        if (!function)
        {
            data.reject();
            return;
        }
        
        if (!data.arg_data_type && !data.extractIdentifierAndType(ast_function))