Skip to content

Rework to_batch_interval_start#4400

Merged
tgeoghegan merged 3 commits intomainfrom
timg/to-batch-interval-start-cleanup
Feb 26, 2026
Merged

Rework to_batch_interval_start#4400
tgeoghegan merged 3 commits intomainfrom
timg/to-batch-interval-start-cleanup

Conversation

@tgeoghegan
Copy link
Contributor

DateTimeExt::to_batch_interval_start is reworked into TimeExt::to_batch_interval_start. We make it clear that it's not about converting between two time precisions, but aligning a Time in whatever time precision to a given Duration in that time precision. The single callsite of the old to_batch_interval_start is removed, and a few places that were doing their own math to align to batch intervals now use the new TimeExt method.

Part of #4225

`DateTimeExt::to_batch_interval_start` is reworked into
`TimeExt::to_batch_interval_start`. We make it clear that it's not about
converting between two time precisions, but aligning a `Time` in
whatever time precision to a given `Duration` in that time precision.
The single callsite of the old `to_batch_interval_start` is removed, and
a few places that were doing their own math to align to batch intervals
now use the new `TimeExt` method.

Part of #4225
@tgeoghegan tgeoghegan requested a review from a team as a code owner February 26, 2026 18:59
tgeoghegan added a commit that referenced this pull request Feb 26, 2026
The test-only `Clock::now_aligned_to_precision` is redundant because you
can equivalently do `clock.now().to_time()`.

See #4400 for discussion.
@tgeoghegan tgeoghegan merged commit 274b89c into main Feb 26, 2026
9 checks passed
@tgeoghegan tgeoghegan deleted the timg/to-batch-interval-start-cleanup branch February 26, 2026 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants