Clickhouse Server version: 22.3.2.1 and 21.6.5.37

Minimal Reproducible Code: 
`select
	arrayJoin(arrayDifference(groupArray(nb))) as res
from
	(
select
		toUInt32(number % 11) as nb
	from
		numbers(100))`

When I using arrayDifference function on an array of UInt32 elements, I get huge numbers around 2^32 instead of expected negative numbers.   
The same function works properly on Uint8, Uint16 and even Uint64.

And also I found 
> `The type of elements in the resulting array is determined by the type inference rules for subtraction (e.g. UInt8 - UInt8 = Int16).`

in document at [https://clickhouse.com/docs/en/sql-reference/functions/array-functions/#arraydifference](url)

So it seems like an unexpected result, but I'm not sure. Hoping for your anwser! 
}
        }
    }
    template <typename Element, typename Result>
    static bool executeType(const ColumnPtr & mapped, const ColumnArray & array, ColumnPtr & res_ptr)
    {
        using ColVecType = ColumnVectorOrDecimal<Element>;
        using ColVecResult = ColumnVectorOrDecimal<Result>;
        const ColVecType * column = checkAndGetColumn<ColVecType>(&*mapped);
        if (!column)
            return false;
        const IColumn::Offsets & offsets = array.getOffsets();
        const typename ColVecType::Container & data = column->getData();
        typename ColVecResult::MutablePtr res_nested;
        if constexpr (is_decimal<Element>)
            res_nested = ColVecResult::create(0, column->getScale());
        else
            res_nested = ColVecResult::create();
        typename ColVecResult::Container & res_values = res_nested->getData();
        res_values.resize(data.size());
        size_t pos = 0;
        for (auto offset : offsets)
        {
            impl(data.data(), res_values.data(), pos, offset);
            pos = offset;
        }
        res_ptr = ColumnArray::create(std::move(res_nested), array.getOffsetsPtr());
        return true;
    }
    static ColumnPtr execute(const ColumnArray & array, ColumnPtr mapped)