**Describe the unexpected behaviour**
Expected create view from any "select" query, but it doesn't work.
But select-query is correct and working
version 20.4.5.36
**How to reproduce**

CREATE VIEW tempView AS
WITH(SELECT groupArray(a) FROM (SELECT [1, 2] AS a)) AS aaa
SELECT aaa


**Error message and/or stacktrace**
Code: 53, e.displayText() = DB::Exception: CAST AS Array can only be performed between same-dimensional array types or from String

{
        const IColumn & col_from = *arguments[0].column;
        size_t size = col_from.size();
        const IDataType & data_type_to = *result_type;
        if (const ColumnString * col_from_string = checkAndGetColumn<ColumnString>(&col_from))
        {
            auto res = data_type_to.createColumn();
            IColumn & column_to = *res;
            column_to.reserve(size);
            const ColumnString::Chars & chars = col_from_string->getChars();
            const IColumn::Offsets & offsets = col_from_string->getOffsets();
            size_t current_offset = 0;
            FormatSettings format_settings;
            auto serialization = data_type_to.getDefaultSerialization();
            for (size_t i = 0; i < size; ++i)
            {
                ReadBufferFromMemory read_buffer(&chars[current_offset], offsets[i] - current_offset - 1);
                serialization->deserializeWholeText(column_to, read_buffer, format_settings);
                if (!read_buffer.eof())
                    throwExceptionForIncompletelyParsedValue(read_buffer, result_type);
                current_offset = offsets[i];
            }
            return res;
        }
        else
            throw Exception("Illegal column " + arguments[0].column->getName()
                    + " of first argument of conversion function from string",
                ErrorCodes::ILLEGAL_COLUMN);