**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'`
{
public:
    explicit AddDefaultDatabaseVisitor(
        const String & database_name_, bool only_replace_current_database_function_ = false, WriteBuffer * ostr_ = nullptr)
        : database_name(database_name_)
        , only_replace_current_database_function(only_replace_current_database_function_)
        , visit_depth(0)
        , ostr(ostr_)
    {}
    void visitDDL(ASTPtr & ast) const
    {
        visitDDLChildren(ast);
        if (!tryVisitDynamicCast<ASTAlterQuery>(ast) &&
            !tryVisitDynamicCast<ASTQueryWithTableAndOutput>(ast) &&
            !tryVisitDynamicCast<ASTRenameQuery>(ast) &&
            !tryVisitDynamicCast<ASTFunction>(ast))
        {}
    }
    void visit(ASTPtr & ast) const
    {
        if (!tryVisit<ASTSelectQuery>(ast) &&
            !tryVisit<ASTSelectWithUnionQuery>(ast) &&
            !tryVisit<ASTFunction>(ast))
            visitChildren(*ast);
    }
    void visit(ASTSelectQuery & select) const