**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 auto & from_values = from_type->getValues();
        const auto & to_values = to_type->getValues();
        using ValueType = std::common_type_t<typename EnumTypeFrom::FieldType, typename EnumTypeTo::FieldType>;
        using NameValuePair = std::pair<std::string, ValueType>;
        using EnumValues = std::vector<NameValuePair>;
        EnumValues name_intersection;
        std::set_intersection(std::begin(from_values), std::end(from_values),
            std::begin(to_values), std::end(to_values), std::back_inserter(name_intersection),
            [] (auto && from, auto && to) { return from.first < to.first; });
        for (const auto & name_value : name_intersection)
        {
            const auto & old_value = name_value.second;
            const auto & new_value = to_type->getValue(name_value.first);
            if (old_value != new_value)
                throw Exception{"Enum conversion changes value for element '" + name_value.first +
                    "' from " + toString(old_value) + " to " + toString(new_value), ErrorCodes::CANNOT_CONVERT_TYPE};
        }
    }
    template <typename ColumnStringType, typename EnumType>
    WrapperType createStringToEnumWrapper() const