Temporal Filters
Temporal filters restrict the rows at a path step by comparing their time-range values to the time-range value of the starting row. They apply Minyu’s temporal-relation engine to determine which related rows should continue along the path.
A temporal filter can only be used when both the starting row and the filtered step contain a supported time-range type. A separate article describes temporal relations in detail.
Why Temporal Filters Are Needed
Some rules require evaluating how related intervals interact with the source interval. These cases cannot be handled by checking individual row values or comparing sets.
Examples:
- Preventing overlapping bookings for shared resources
- Selecting only contracts active during a specific period
- Ensuring availability ranges contain the requested interval
Temporal filters provide this interval-comparison logic directly.
Temporal Relation Foundation
Temporal filters are based on the 13 standard interval relations from temporal logic (commonly known as Allen’s interval algebra). These relations formally describe how two time intervals may relate to each other (e.g., overlaps, before, during, contains).