ClickHouse server version 20.8.9 revision 54438

Let's imagine some simple table structure:

```
CREATE TABLE users (
    `user_id` Int32
)
```

Modulo operator on **Int32** field with **150** argument returns negative result. This could have happened due to wrong type casting - result should be casted to **Int16** or **UInt8** instead of **Int8**.

```
SELECT 
    user_id % 150, 
    441746 % 150,
    toTypeName(user_id % 150),
    toTypeName(441746 % 150)
FROM users 
WHERE user_id = 441746
LIMIT 1
```

```
┌─modulo(user_id, 150)─┬─modulo(441746, 150)─┬─toTypeName(modulo(user_id, 150))─┬─toTypeName(modulo(441746, 150))─┐
│                -110  │                 146 │ Int8                             │ UInt8                           │
└──────────────────────┴─────────────────────┴──────────────────────────────────┴─────────────────────────────────┘
```
{
    ifRightType<T0, DB::UInt8>();
    ifRightType<T0, DB::UInt16>();
    ifRightType<T0, DB::UInt32>();
    ifRightType<T0, DB::UInt64>();
    ifRightType<T0, DB::UInt256>();
    ifRightType<T0, DB::Int8>();
    ifRightType<T0, DB::Int16>();
    ifRightType<T0, DB::Int32>();
    ifRightType<T0, DB::Int64>();
    ifRightType<T0, DB::Int128>();
    ifRightType<T0, DB::Int256>();
    ifRightType<T0, DB::Float32>();
    ifRightType<T0, DB::Float64>();
}
TEST(NumberTraits, ResultOfAdditionMultiplication)
{
    ASSERT_EQ(getTypeString(DB::NumberTraits::ResultOfAdditionMultiplication<DB::UInt8, DB::UInt8>::Type()), "UInt16");
    ASSERT_EQ(getTypeString(DB::NumberTraits::ResultOfAdditionMultiplication<DB::UInt8, DB::Int32>::Type()), "Int64");
    ASSERT_EQ(getTypeString(DB::NumberTraits::ResultOfAdditionMultiplication<DB::UInt8, DB::Float32>::Type()), "Float64");
}
TEST(NumberTraits, ResultOfSubtraction)