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

: scale_multiplier(DecimalUtils::scaleMultiplier<DateTime64::NativeType>(scale))
    {}
    inline NO_SANITIZE_UNDEFINED DateTime64::NativeType execute(FromType from, const DateLUTImpl &) const
    {
        from = std::min<time_t>(from, LUT_MAX_TIME);
        return DecimalUtils::decimalFromComponentsWithMultiplier<DateTime64>(from, 0, scale_multiplier);
    }
};
template <typename FromType>
struct ToDateTime64TransformSigned
{
    static constexpr auto name = "toDateTime64";
    const DateTime64::NativeType scale_multiplier = 1;
    ToDateTime64TransformSigned(UInt32 scale = 0)
        : scale_multiplier(DecimalUtils::scaleMultiplier<DateTime64::NativeType>(scale))
    {}
    inline NO_SANITIZE_UNDEFINED DateTime64::NativeType execute(FromType from, const DateLUTImpl &) const
    {
        from = std::max<time_t>(from, LUT_MIN_TIME);
        from = std::min<time_t>(from, LUT_MAX_TIME);
        return DecimalUtils::decimalFromComponentsWithMultiplier<DateTime64>(from, 0, scale_multiplier);
    }
};
template <typename FromDataType, typename FromType>
struct ToDateTime64TransformFloat
{
    static constexpr auto name = "toDateTime64";
    const UInt32 scale = 1;
    ToDateTime64TransformFloat(UInt32 scale_ = 0)
        : scale(scale_)