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! 
{
        ColumnPtr res;
        mapped = mapped->convertToFullColumnIfConst();
        if (executeType< UInt8 ,  Int16>(mapped, array, res) ||
            executeType< UInt16,  Int32>(mapped, array, res) ||
            executeType< UInt32,  Int64>(mapped, array, res) ||
            executeType< UInt64,  Int64>(mapped, array, res) ||
            executeType<  Int8 ,  Int16>(mapped, array, res) ||
            executeType<  Int16,  Int32>(mapped, array, res) ||
            executeType<  Int32,  Int64>(mapped, array, res) ||
            executeType<  Int64,  Int64>(mapped, array, res) ||
            executeType<Float32,Float64>(mapped, array, res) ||
            executeType<Float64,Float64>(mapped, array, res) ||
            executeType<Decimal32, Decimal32>(mapped, array, res) ||
            executeType<Decimal64, Decimal64>(mapped, array, res) ||
            executeType<Decimal128, Decimal128>(mapped, array, res))
            return res;
        else
            throw Exception("Unexpected column for arrayDifference: " + mapped->getName(), ErrorCodes::ILLEGAL_COLUMN);
    }
};
struct NameArrayDifference { static constexpr auto name = "arrayDifference"; };
using FunctionArrayDifference = FunctionArrayMapped<ArrayDifferenceImpl, NameArrayDifference>;
REGISTER_FUNCTION(ArrayDifference)
{
    factory.registerFunction<FunctionArrayDifference>();
}
}