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
```

if (ast_col_decl.default_expression)
        {
            command.default_kind = columnDefaultKindFromString(ast_col_decl.default_specifier);
            command.default_expression = ast_col_decl.default_expression;
        }
        if (ast_col_decl.comment)
        {
            const auto & ast_comment = ast_col_decl.comment->as<ASTLiteral &>();
            command.comment.emplace(ast_comment.value.get<String>());
        }
        if (ast_col_decl.ttl)
            command.ttl = ast_col_decl.ttl;
        if (ast_col_decl.codec)
            command.codec = compression_codec_factory.get(ast_col_decl.codec, command.data_type, sanity_check_compression_codecs);
        if (command_ast->column)
            command.after_column = getIdentifierName(command_ast->column);
        command.first = command_ast->first;
        command.if_exists = command_ast->if_exists;
        return command;
    }
    else if (command_ast->type == ASTAlterCommand::COMMENT_COLUMN)
    {
        AlterCommand command;
        command.ast = command_ast->clone();
        command.type = COMMENT_COLUMN;
        command.column_name = getIdentifierName(command_ast->column);
        const auto & ast_comment = command_ast->comment->as<ASTLiteral &>();
        command.comment = ast_comment.value.get<String>();
        command.if_exists = command_ast->if_exists;
        return command;