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

metadata_copy.sorting_key.recalculateWithNewColumns(metadata_copy.columns, context);
    if (metadata_copy.primary_key.definition_ast != nullptr)
    {
        metadata_copy.primary_key.recalculateWithNewColumns(metadata_copy.columns, context);
    }
    else
    {
        metadata_copy.primary_key = KeyDescription::getKeyFromAST(metadata_copy.sorting_key.definition_ast, metadata_copy.columns, context);
        metadata_copy.primary_key.definition_ast = nullptr;
    }
    
    if (metadata_copy.partition_key.definition_ast != nullptr)
        metadata_copy.partition_key.recalculateWithNewColumns(metadata_copy.columns, context);
    
    for (auto & index : metadata_copy.secondary_indices)
        index.recalculateWithNewColumns(metadata_copy.columns, context);
    
    auto column_ttl_asts = metadata_copy.columns.getColumnTTLs();
    for (const auto & [name, ast] : column_ttl_asts)
    {
        auto new_ttl_entry = TTLDescription::getTTLFromAST(ast, metadata_copy.columns, context, metadata_copy.primary_key);
        metadata_copy.column_ttls_by_name[name] = new_ttl_entry;
    }
    if (metadata_copy.table_ttl.definition_ast != nullptr)
        metadata.table_ttl = TTLTableDescription::getTTLForTableFromAST(
            metadata_copy.table_ttl.definition_ast, metadata_copy.columns, context, metadata_copy.primary_key);
    metadata = std::move(metadata_copy);
}
void AlterCommands::prepare(const StorageInMemoryMetadata & metadata)