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

{
        
        if (checkAndGetDataType<DataTypeString>(from_type_untyped.get()))
        {
            return [] (ColumnsWithTypeAndName & arguments, const DataTypePtr & result_type, const ColumnNullable *, size_t )
            {
                return ConvertImplGenericFromString::execute(arguments, result_type);
            };
        }
        DataTypePtr from_nested_type;
        DataTypePtr to_nested_type;
        const auto * from_type = checkAndGetDataType<DataTypeArray>(from_type_untyped.get());
        
        if (from_type && to_type)
        {