Confusion in `in_time_interval`
There's some confusion inside the !6 (merged) merge request around checking if given thing is inside the interval the query asks about. As the branch is mostly about something else and already large, let's solve the problem separately in a new branch.
Source of the half of the interval length
Currently, we consider a flow or something to be part the interval by „rounding“ ‒ if they overlap by at least half of the length of the slice, we consider them relevant for the query. However, we currently take half of the whole thing, which is wrong for two reasons:
- Some future containers will contain multiple consecutive time slices. We need half of the slice length, not half of the time covered by the container.
- A flow slice may be shorter than the whole time slice it lives in. In such case we want to take half of the time slice, not the (possibly shorter) flow slice.
Therefore, the InTimeInterval
trait might need some additional method, so the thing can specify what is the relevant length.
Very short flows
If the whole flow is so short it fully fits into the queried interval but is shorter than the half of the granularity of the container, it would be ignored now (making it basically impossible to query for). If something is fully so small it fits completely in, we want to consider it inside.