Repository navigation
fix: read items in the last second of each time step - #97
Merged
hrodmn merged 1 commit intoNov 18, 2026
Merged
Conversation
Daily steps passed rustac a bare date, which it ends at 23:59:59, and hourly steps ended on the second before the next. An item at 23:59:59.5 was in no time step, so it was never read. Every bucketed filter is now a closed range ending a microsecond before the next bucket, DuckDB's timestamp precision. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hrodmn
force-pushed
the
fix/whole-period-datetime-filters
branch
from
November 18, 2026 02:25
1dd6326 to
cfe3f7f
Compare
hrodmn
approved these changes
Nov 18, 2026
hrodmn
left a comment
Collaborator
There was a problem hiding this comment.
Another helpful fix - thanks @earlybard !
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Daily steps pass rustac a bare
YYYY-MM-DDas thedatetimefilter, and rustac ends a bare date at23:59:59. Weekly, monthly, yearly andPnDsteps end the same way, andPTnHsteps end on the second before the next bucket. So an item timestamped in the last second of its step, e.g.23:59:59.5, matches no step's filter and is never read, with no error.This makes every bucketed filter a closed range ending a microsecond before the next bucket, e.g.
2023-01-15T00:00:00Z/2023-01-15T23:59:59.999999Z. DuckDB stores timestamps to the microsecond, so steps still don't overlap. Exact grouping (time_period=None) is unchanged.To reproduce, write one item at
2023-12-31T23:59:59.5Zand search with each grouper's filter:The new test does this for
P1D,P1W,P1M,P1Y,PnDandPT1H. The tests that pinned the old filter strings now pin the new ones.The flexible temporal grouping spec chose second precision for
PTnHand accepted that fractional-second items could be missed. Sentinel-2 and Landsat times do have fractional seconds, though, and the daily case wasn't covered there, so this moves every period to microseconds. I've left the spec as written, as a record of the original decision.We found this while checking an in-memory index of lazycogs' item searches against DuckDB, for Geoscience Australia's ARD.
🤖 Generated with Claude Code