```
SELECT version()
─version()─┐
│ 21.8.5.7  │
└───────────┘
```
We have a request, as a result of which we get an array.
When getting an item using a computed value, there is no value
```
SELECT
    arrayMap(x -> x, [[1], [2], [3]]) AS x,
    toTypeName(x),
    x[3 - 2] AS y,
    x[toInt64(1)] AS yy,
    x[toUInt8(1)] AS yyy

┌─x─────────────┬─toTypeName(arrayMap(lambda(tuple(x), x), [[1], [2], [3]]))─┬─y──┬─yy─┬─yyy─┐
│ [[1],[2],[3]] │ Array(Array(UInt8))                                        │ [] │ [] │ [1] │
└───────────────┴────────────────────────────────────────────────────────────┴────┴────┴─────┘
```
However, when the array is explicitly specified, the value is present.
The types are the same.
```
SELECT
    [[1], [2], [3]] AS x,
    toTypeName(x),
    x[3 - 2] AS y,
    x[toInt64(1)] AS yy,
    x[toInt8(1)] AS yyy

┌─x─────────────┬─toTypeName([[1], [2], [3]])─┬─y───┬─yy──┬─yyy─┐
│ [[1],[2],[3]] │ Array(Array(UInt8))         │ [1] │ [1] │ [1] │
└───────────────┴─────────────────────────────┴─────┴─────┴─────┘
```


{
    return name;
}
DataTypePtr FunctionArrayElement::getReturnTypeImpl(const DataTypes & arguments) const
{
    if (const auto * map_type = checkAndGetDataType<DataTypeMap>(arguments[0].get()))
        return map_type->getValueType();
    const auto * array_type = checkAndGetDataType<DataTypeArray>(arguments[0].get());
    if (!array_type)
    {
        throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT,
            "First argument for function '{}' must be array, got '{}' instead",
            getName(), arguments[0]->getName());
    }
    if (!isInteger(arguments[1]))
    {
        throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT,
            "Second argument for function '{}' must be integer, got '{}' instead",
            getName(), arguments[1]->getName());
    }
    return array_type->getNestedType();
}
ColumnPtr FunctionArrayElement::executeImpl(const ColumnsWithTypeAndName & arguments, const DataTypePtr & result_type, size_t input_rows_count) const