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

WrapperType && wrapper_function_, const char * name_, std::optional<Diagnostic> diagnostic_)
            : wrapper_function(std::move(wrapper_function_)), name(name_), diagnostic(std::move(diagnostic_)) {}
    String getName() const override { return name; }
protected:
    ColumnPtr execute(const ColumnsWithTypeAndName & arguments, const DataTypePtr & result_type, size_t input_rows_count) const override
    {
        
        ColumnsWithTypeAndName new_arguments{arguments.front()};
        if (arguments.size() > 2)
            new_arguments.insert(std::end(new_arguments), std::next(std::begin(arguments), 2), std::end(arguments));
        try
        {
            return wrapper_function(new_arguments, result_type, nullptr, input_rows_count);
        }
        catch (Exception & e)
        {
            if (diagnostic)
                e.addMessage("while converting source column " + backQuoteIfNeed(diagnostic->column_from) +
                             " to destination column " + backQuoteIfNeed(diagnostic->column_to));
            throw;
        }
    }
    bool useDefaultImplementationForNulls() const override { return false; }