v.22.1Improvement

Allow Negative Intervals in intervalLengthSum Function

Allow negative intervals in function intervalLengthSum. Their length will be added as well. This closes #33323. #33335 (alexey-milovidov).
intervalLengthSum function now supports negative intervals. The lengths of negative intervals are included in the sum calculation.

Why it matters

Previously, the intervalLengthSum function only accounted for positive intervals, which limited its use with datasets that contain negative durations or require net interval calculations. Supporting negative intervals allows users to aggregate both positive and negative durations accurately, enhancing time interval analysis capabilities.

How to use it

Simply pass negative interval values as arguments to intervalLengthSum. The function will add the absolute lengths of both positive and negative intervals when computing the sum.