**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)
```
{
public:
    static constexpr auto name = "mapPopulateSeries";
    static FunctionPtr create(ContextPtr) { return std::make_shared<FunctionMapPopulateSeries>(); }
private:
    String getName() const override { return name; }
    size_t getNumberOfArguments() const override { return 0; }
    bool isVariadic() const override { return true; }
    bool useDefaultImplementationForConstants() const override { return true; }
    bool isSuitableForShortCircuitArgumentsExecution(const DataTypesWithConstInfo & ) const override { return true; }
    void checkTypes(const DataTypePtr & key_type, const DataTypePtr max_key_type) const
    {
        WhichDataType which_key(key_type);
        if (!(which_key.isInt() || which_key.isUInt()))
        {
            throw Exception(
                ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Keys for {} function should be of integer type (signed or unsigned)", getName());
        }
        if (max_key_type)
        {
            WhichDataType which_max_key(max_key_type);
            if (which_max_key.isNullable())
                throw Exception(
                    ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT,
                    "Max key argument in arguments of function " + getName() + " can not be Nullable");
            if (key_type->getTypeId() != max_key_type->getTypeId())
                throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Max key type in {} should be same as keys type", getName());
        }
    }
    DataTypePtr getReturnTypeForTuple(const DataTypes & arguments) const