**Describe what's wrong**


**How to reproduce**


```sql

SELECT mapPopulateSeries(range(10), range(10), toUInt8(number))
FROM numbers(10)
LIMIT 1

Query id: 5eb2e3fb-26a0-4a17-8a37-9714d35095bd

┌─mapPopulateSeries(range(10), range(10), toUInt8(number))─┐
│ ([0],[0])                                                │
└──────────────────────────────────────────────────────────┘
┌─mapPopulateSeries(range(10), range(10), toUInt8(number))─┐
│ ([0],[0])                                                │
└──────────────────────────────────────────────────────────┘

2 rows in set. Elapsed: 0.004 sec.

SELECT mapPopulateSeries(range(900), range(900), materialize(1000)).2
FROM numbers(100)
FORMAT `Null`

Query id: 6418bf79-5d29-4709-86d6-7bdee9b7c9f7

← Progress: 0.00 rows, 0.00 B (0.00 rows/s., 0.00 B/s.)
1 rows in set. Elapsed: 0.014 sec.

Received exception from server (version 21.13.1):
Code: 49. DB::Exception: Received from localhost:9000. DB::Exception: Invalid number of rows in Chunk column Array(UInt16) position 0: expected 100, got 1. (LOGICAL_ERROR)

SELECT mapPopulateSeries(range(900), range(900), toUInt16(number)).2
FROM numbers(100)
LIMIT 1000

┌─tupleElement(mapPopulateSeries(range(900), range(900), toUInt16(number)), 2)─┐
│ [0]                                                                          │
└──────────────────────────────────────────────────────────────────────────────┘
→ Progress: 0.00 rows, 0.00 B (0.00 rows/s., 0.00 B/s.)
1 rows in set. Elapsed: 0.007 sec.

Received exception from server (version 21.13.1):
Code: 49. DB::Exception: Received from localhost:9000. DB::Exception: Invalid number of rows in Chunk column Array(UInt16) position 0: expected 100, got 1. (LOGICAL_ERROR)

SELECT mapPopulateSeries(range(10), range(10), toUInt16(number))
FROM numbers(10)
LIMIT 1

Query id: 7b6d6e3d-19f1-489b-93a7-022eaa507af4


0 rows in set. Elapsed: 0.003 sec.

Received exception from server (version 21.13.1):
Code: 43. DB::Exception: Received from localhost:9000. DB::Exception: Max key type in mapPopulateSeries should be same as keys type: While processing mapPopulateSeries(range(10), range(10), toUInt16(number)). (ILLEGAL_TYPE_OF_ARGUMENT)
```

**Expected behavior**

> A clear and concise description of what you expected to happen.

**Error message and/or stacktrace**

```
Code: 49. DB::Exception: Received from localhost:9000. DB::Exception: Invalid number of rows in Chunk column Array(UInt16) position 0: expected 100, got 1. (LOGICAL_ERROR)
```
{
        if (arguments.size() < 2)
            throw Exception(
                ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH, "Function {} accepts at least two arrays for key and value", getName());
        if (arguments.size() > 3)
            throw Exception(ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH, "Too many arguments in {} call", getName());
        const DataTypeArray * key_array_type = checkAndGetDataType<DataTypeArray>(arguments[0].get());
        const DataTypeArray * val_array_type = checkAndGetDataType<DataTypeArray>(arguments[1].get());
        if (!key_array_type || !val_array_type)
            throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Function {} accepts two arrays for key and value", getName());
        const auto & key_type = key_array_type->getNestedType();
        if (arguments.size() == 3)
            this->checkTypes(key_type, arguments[2]);
        else
            this->checkTypes(key_type, nullptr);
        return std::make_shared<DataTypeTuple>(DataTypes{arguments[0], arguments[1]});
    }
    DataTypePtr getReturnTypeForMap(const DataTypes & arguments) const
    {
        const auto * map = assert_cast<const DataTypeMap *>(arguments[0].get());
        if (arguments.size() == 1)
            this->checkTypes(map->getKeyType(), nullptr);
        else if (arguments.size() == 2)
            this->checkTypes(map->getKeyType(), arguments[1]);
        else
            throw Exception(ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH, "Too many arguments in {} call", getName());
        return std::make_shared<DataTypeMap>(map->getKeyType(), map->getValueType());
    }
    DataTypePtr getReturnTypeImpl(const DataTypes & arguments) const override