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                           │
└──────────────────────┴─────────────────────┴──────────────────────────────────┴─────────────────────────────────┘
```
static std::string getTypeString(DB::Int32) { return "Int32"; }
static std::string getTypeString(DB::Int64) { return "Int64"; }
static std::string getTypeString(DB::Int128) { return "Int128"; }
static std::string getTypeString(DB::Int256) { return "Int256"; }
static std::string getTypeString(DB::Float32) { return "Float32"; }
static std::string getTypeString(DB::Float64) { return "Float64"; }
static std::string getTypeString(DB::NumberTraits::Error) { return "Error"; }
template <typename T0, typename T1>
[[maybe_unused]] void printTypes()
{
    std::cout << "{{\"";
    std::cout << getTypeString(T0());
    std::cout << "\", \"";
    std::cout << getTypeString(T1());
    std::cout << "\"}, \"";
    std::cout << getTypeString(typename DB::NumberTraits::ResultOfIf<T0, T1>::Type());
    std::cout << "\"},"<< std::endl;
}
template <typename T0, typename T1>
void ifRightType()
{
    auto desired = getTypeString(typename DB::NumberTraits::ResultOfIf<T0, T1>::Type());
    auto left = getTypeString(T0());
    auto right = getTypeString(T1());
    auto expected = answer.find({left, right});
    ASSERT_TRUE(expected != answer.end());
    ASSERT_EQ(expected->second, desired);
}
template <typename T0>
void ifLeftType()