[BACK-4387] Update TIDE category boundaries to be inclusive rounded values.#232
Open
lostlevels wants to merge 4 commits intomasterfrom
Open
[BACK-4387] Update TIDE category boundaries to be inclusive rounded values.#232lostlevels wants to merge 4 commits intomasterfrom
lostlevels wants to merge 4 commits intomasterfrom
Conversation
…nclusive of the boundary condition.
This commits adds categorizing a field based on its whole number rounded percent values. It adds an "extra" call against the unrounded value in the query in order to be indexable (see comments in `availableCategories`.
ewollesen
requested changes
Apr 30, 2026
| return bson.A{ | ||
| bson.M{field: bson.M{"$lt": 0.70 - halfAPercent}}, // < because round(0.695) = round(69.5%) = 70% so values less than 69.5% round to < 70%. | ||
| bson.M{"$expr": bson.M{ | ||
| "$lte": bson.A{ |
Contributor
There was a problem hiding this comment.
This should be $lt.
While no test case for cgm use time was provided in the ticket, it might be worth adding one. Or modifying one of the existing ones to show this distinction.
Contributor
Author
There was a problem hiding this comment.
Probably a good idea to add tests around all the boundaries I reckon.
Contributor
Author
There was a problem hiding this comment.
This is actually correct. The CGM wear time is one of the few categories that uses an exclusive bounds. Added test for it.
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.
Updates the TIDE report query predicates to query on rounded percents and be inclusive thresholds instead of exclusive. See comments in code for more details.