You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# The condition `start_date >= period.snapshot0.date or end_date <= period.snapshot1.date`
1095
-
# means it includes periods that *overlap* with the range, not strictly *within*.
1096
-
# So for 2021-06-01 to 2022-06-01:
1097
-
# rp1: (2020-01-01 to 2021-01-01) -> end_date (2022-06-01) is not <= 2021-01-01. start_date (2021-06-01) is not >= 2020-01-01. So this condition is OR.
1098
-
# This condition seems to be designed to return periods that are *outside* or *partially outside* the range,
1099
-
# which is counter-intuitive for "get_risk_periods". Let's re-evaluate the original logic.
1100
-
1101
-
# Original condition: start_date >= period.snapshot0.date or end_date <= period.snapshot1.date
1102
-
# This condition is true if the query start date is after or equal to period's start date
1103
-
# OR if the query end date is before or equal to period's end date.
1104
-
# This is essentially: (period_starts_before_or_at_query_start) OR (period_ends_after_or_at_query_end)
1105
-
# This seems to be a filter for periods that are *partially or fully contained* by the query range,
1106
-
# or that *start before* the query range, or *end after* the query range.
1107
-
# It's an "overlapping or encompassing" filter.
1108
-
1109
-
# Let's test with the provided dates and the OR condition
0 commit comments