FIX: Add microseconds to the webpoda queries#292
Merged
greglucas merged 2 commits intoIMAP-Science-Operations-Center:mainfrom Jan 20, 2026
Merged
FIX: Add microseconds to the webpoda queries#292greglucas merged 2 commits intoIMAP-Science-Operations-Center:mainfrom
greglucas merged 2 commits intoIMAP-Science-Operations-Center:mainfrom
Conversation
When doing <= queries, we need to make sure we go up to the end of the time interval. If a packet had a timestamp of 23:59:59.2 then that wouldn't be caught by a query of <= 23:59:59 because there is an implicit floor in the backend web API.
Contributor
Author
|
Actually, I just saw this note: imap-data-access/imap_data_access/webpoda.py Lines 442 to 445 in 662149c Maybe we do want to switch over to be less-than on the right edge... |
Rather than trying to add maximum values to times, we can switch over to using an exclusive right edge with a less-than comparison. This helps avoid issues with microsecond precision in the database timestamps when we were only querying with seconds resolution before.
subagonsouth
approved these changes
Jan 20, 2026
Contributor
subagonsouth
left a comment
There was a problem hiding this comment.
I like the strictly less than comparison on the end time. Looks good to me.
ae28ac2
into
IMAP-Science-Operations-Center:main
16 checks passed
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.
When doing <= queries, we need to make sure we go up to the end of the time interval. If a packet had a timestamp of 23:59:59.2 then that wouldn't be caught by a query of <= 23:59:59 because there is an implicit floor in the backend web API.
An alternative option would be to change from less-than-or-equal to "add one second and then do a less-than comparison instead. I'm indifferent, so if anyone else has a preference for the other way, then I'm happy to change it to that.
closes #291