**Describe the bug**
`SELECT i FROM generateRandom('i Array(Int8)', 1048575, 10, 1048577) LIMIT 1048575`

Memory limit should be respected.
from.table = table_id.table_name;
            ASTRenameQuery::Table to;
            to.database = table_id.database_name;
            to.table = table_id.table_name + "_" + toString(suffix);
            ASTRenameQuery::Element elem;
            elem.from = from;
            elem.to = to;
            rename->elements.emplace_back(elem);
            LOG_DEBUG(log, "Existing table {} for system log has obsolete or different structure. Renaming it to {}", description, backQuoteIfNeed(to.table));
            InterpreterRenameQuery(rename, context).execute();
            
            table = nullptr;
        }
        else if (!is_prepared)
            LOG_DEBUG(log, "Will use existing table {} for {}", description, LogElement::name());
    }
    if (!table)
    {
        
        LOG_DEBUG(log, "Creating new table {} for {}", description, LogElement::name());
        auto create = getCreateTableQuery();
        InterpreterCreateQuery interpreter(create, context);
        interpreter.setInternal(true);
        interpreter.execute();
        table = DatabaseCatalog::instance().getTable(table_id, context);
    }
    is_prepared = true;
}
template <typename LogElement>
ASTPtr SystemLog<LogElement>::getCreateTableQuery()