I tried to rename a key column in a MergeTree table. It does not work, and 20.4 is very clear about the reason. 
20.5.2 is complaining about non-existing column with the old name, suggesting there is a column with the new name:
```
ALTER TABLE rename_key
    RENAME COLUMN key TO new

Received exception from server (version 20.4.6):
Code: 44. DB::Exception: Received from localhost:9000. 
DB::Exception: Trying to ALTER RENAME key key column which is a part of key expression.

Received exception from server (version 20.5.2):
Code: 47. DB::Exception: Received from localhost:9000. 
DB::Exception: Missing columns: 'key' while processing query: 'key', required columns: 'key', source columns: 'value' 'new' 'date'.
```
The message hasn't changed for the partition key:
```
ALTER TABLE rename_key
    RENAME COLUMN date TO new

Received exception from server (version 20.4.6):
Code: 44. DB::Exception: Received from localhost:9000. 
DB::Exception: Trying to ALTER RENAME key date column which is a part of key expression.

Received exception from server (version 20.5.2):
Code: 524. DB::Exception: Received from localhost:9000. 
DB::Exception: Trying to ALTER RENAME key date column which is a part of key expression.
```
The table:
```
CREATE TABLE rename_key
(
    `date` Date,
    `key` UInt64,
    `value` String
)
ENGINE = MergeTree()
PARTITION BY date
ORDER BY key
```

else
                settings_from_storage.push_back(change);
        }
    }
    else if (type == RENAME_COLUMN)
    {
        metadata.columns.rename(column_name, rename_to);
        RenameColumnData rename_data{column_name, rename_to};
        RenameColumnVisitor rename_visitor(rename_data);
        for (const auto & column : metadata.columns)
        {
            metadata.columns.modify(column.name, [&](ColumnDescription & column_to_modify)
            {
                if (column_to_modify.default_desc.expression)
                    rename_visitor.visit(column_to_modify.default_desc.expression);
                if (column_to_modify.ttl)
                    rename_visitor.visit(column_to_modify.ttl);
            });
        }
        if (metadata.table_ttl.definition_ast)
            rename_visitor.visit(metadata.table_ttl.definition_ast);
        metadata.table_ttl = TTLTableDescription::getTTLForTableFromAST(
            metadata.table_ttl.definition_ast, metadata.columns, context, metadata.primary_key);
        for (auto & constraint : metadata.constraints.constraints)
            rename_visitor.visit(constraint);
    }
    else
        throw Exception("Wrong parameter type in ALTER query", ErrorCodes::LOGICAL_ERROR);
}
bool AlterCommand::isModifyingData(const StorageInMemoryMetadata & metadata) const