**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

result_column = ConvertImpl<LeftDataType, RightDataType, NameCast>::execute(
                            arguments, result_type, input_rows_count, AccurateConvertStrategyAdditions());
                    }
                    else
                    {
                        result_column = ConvertImpl<LeftDataType, RightDataType, NameCast>::execute(
                            arguments, result_type, input_rows_count, AccurateOrNullConvertStrategyAdditions());
                    }
                    return true;
                }
                return false;
            });
            
            if (!res)
            {
                if (wrapper_cast_type == CastType::accurateOrNull)
                {
                    auto nullable_column_wrapper = FunctionCast::createToNullableColumnWrapper();
                    return nullable_column_wrapper(arguments, result_type, column_nullable, input_rows_count);
                }
                else
                {
                    throw Exception{"Conversion from " + std::string(getTypeName(from_type_index)) + " to " + to_type->getName() + " is not supported",
                        ErrorCodes::CANNOT_CONVERT_TYPE};
                }
            }
            return result_column;
        };
    }
    static WrapperType createStringWrapper(const DataTypePtr & from_type)