**Describe the bug**
https://clickhouse-test-reports.s3.yandex.net/29183/6cf8509ab5da4229b5b1f6b96ff1f162b213e271/fuzzer_ubsan/report.html#fail1

**How to reproduce**
```
ALTER TABLE alter_test MODIFY COLUMN `b` DateTime DEFAULT now(([NULL, NULL, NULL, [-2147483648], [NULL, NULL, NULL, NULL, NULL, NULL, NULL]] AND (1048576 AND NULL) AND (NULL AND 1048575 AND NULL AND -2147483649) AND NULL) IN (test_01103.t1_distr.id))
```

`Changed settings: receive_timeout = '10', receive_data_timeout_ms = '10000', count_distinct_implementation = 'uniqTheta', max_result_rows = '10', optimize_injective_functions_inside_uniq = '0'`
{
        if (only_replace_current_database_function)
            return;
        for (ASTRenameQuery::Element & elem : node.elements)
        {
            if (elem.from.database.empty())
                elem.from.database = database_name;
            if (elem.to.database.empty())
                elem.to.database = database_name;
        }
    }
    void visitDDL(ASTAlterQuery & node, ASTPtr &) const
    {
        if (only_replace_current_database_function)
            return;
        if (node.database.empty())
            node.database = database_name;
        for (const auto & child : node.command_list->children)
        {
            auto * command_ast = child->as<ASTAlterCommand>();
            if (command_ast->from_database.empty())
                command_ast->from_database = database_name;
            if (command_ast->to_database.empty())
                command_ast->to_database = database_name;
        }
    }
    void visitDDL(ASTFunction & function, ASTPtr & node) const