**How to reproduce**
```
SELECT
    intervalLengthSum(10, 5) AS res,
    toInt64(res) AS cast,
    toTypeName(res) AS type

Query id: bc8307c2-a520-4499-959e-bb00e0bdf055

┌──────────────────res─┬─cast─┬─type───┐
│ 18446744073709551611 │   -5 │ UInt64 │
└──────────────────────┴──────┴────────┘
```
**Expected behavior**
intervals with negative sum will be converted to zero.
{
        if (other.segments.empty())
            return;
        const auto size = segments.size();
        segments.insert(std::begin(other.segments), std::end(other.segments));
        
        if (!sorted && !other.sorted)
        {
            std::sort(std::begin(segments), std::end(segments));
        }
        else
        {
            const auto begin = std::begin(segments);
            const auto middle = std::next(begin, size);
            const auto end = std::end(segments);
            if (!sorted)
                std::sort(begin, middle);
            if (!other.sorted)
                std::sort(middle, end);
            std::inplace_merge(begin, middle, end);
        }
        sorted = true;
    }
    void sort()