**Describe the issue**

Improve feedback when trying to replace a partition with a different index

**Which ClickHouse server version to use**

21.9.5


**How to reproduce**

```
DROP DATABASE IF EXISTS test;

CREATE DATABASE test;

CREATE TABLE test.A (id UInt32, company UInt32, total UInt64) ENGINE=SummingMergeTree() PARTITION BY company PRIMARY KEY (id) ORDER BY (id, company);

INSERT INTO test.A SELECT number%10 as id, number%2 as company, count() as total FROM numbers(100) GROUP BY id,company;

CREATE TABLE test.B (id UInt32, company UInt32, total UInt64) ENGINE=SummingMergeTree() PARTITION BY company ORDER BY (id, company);

ALTER TABLE test.B REPLACE PARTITION '0' FROM test.A;

```

**Error message and/or stacktrace**

```
Received exception from server (version 21.9.5):
Code: 33. DB::Exception: Received from localhost:9000. DB::Exception: Cannot read all data. Bytes read: 0. Bytes expected: 4.. (CANNOT_READ_ALL_DATA)
(query: ALTER TABLE test.B REPLACE PARTITION '0' FROM test.A;)
````

**Expected behavior**

```
Code: 33. DB::Exception: Received from localhost:9000. DB::Exception: Cannot replace partition different index (CANNOT_REPLACE_PARTITION)
(query: ALTER TABLE test.B REPLACE PARTITION '0' FROM test.A;)
```

extern const int TOO_MANY_UNEXPECTED_DATA_PARTS;
    extern const int DUPLICATE_DATA_PART;
    extern const int NO_SUCH_COLUMN_IN_TABLE;
    extern const int LOGICAL_ERROR;
    extern const int ILLEGAL_COLUMN;
    extern const int ILLEGAL_TYPE_OF_COLUMN_FOR_FILTER;
    extern const int CORRUPTED_DATA;
    extern const int BAD_TYPE_OF_FIELD;
    extern const int BAD_ARGUMENTS;
    extern const int INVALID_PARTITION_VALUE;
    extern const int METADATA_MISMATCH;
    extern const int PART_IS_TEMPORARILY_LOCKED;
    extern const int TOO_MANY_PARTS;
    extern const int INCOMPATIBLE_COLUMNS;
    extern const int BAD_TTL_EXPRESSION;
    extern const int INCORRECT_FILE_NAME;
    extern const int BAD_DATA_PART_NAME;
    extern const int READONLY_SETTING;
    extern const int ABORTED;
    extern const int UNKNOWN_PART_TYPE;
    extern const int UNKNOWN_DISK;
    extern const int NOT_ENOUGH_SPACE;
    extern const int ALTER_OF_COLUMN_IS_FORBIDDEN;
    extern const int SUPPORT_IS_DISABLED;
    extern const int TOO_MANY_SIMULTANEOUS_QUERIES;
    extern const int INCORRECT_QUERY;
    extern const int CANNOT_RESTORE_TABLE;
    extern const int ZERO_COPY_REPLICATION_ERROR;
}
static void checkSampleExpression(const StorageInMemoryMetadata & metadata, bool allow_sampling_expression_not_in_primary_key, bool check_sample_column_is_correct)