Skip to content

Commit

Permalink
Corrected that issue too.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcdermott committed May 13, 2024
1 parent 538c69c commit c521166
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/esgpt_task_querying/aggregate.py
Original file line number Diff line number Diff line change
Expand Up @@ -1103,7 +1103,9 @@ def boolean_expr_bound_sum(
).alias(c)
for c in cols
}
if closed in ("left", "none"):
if closed in ("left", "none") and offset <= timedelta(0):
# If offset is > 0, we definitely want to include the right endpoint as it will live in the
# augmented offset period, so we only remove it if offset is <= 0
sum_exprs = {c: expr - pl.col(c) for c, expr in sum_exprs.items()}
else:
if closed in ("right", "both"):
Expand Down

0 comments on commit c521166

Please sign in to comment.