Interval Operator Overhaul - #373
Conversation
|
@lmd59 - I added you as a reviewer since you reviewed #365 (which this replaces), but if you don't have time, then I think anyone else on the team would be fine. @dehall will also review, but this one is kind of big, so two reviewers might be good -- especially if someone from your team can regress it with fqm. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #373 +/- ##
==========================================
+ Coverage 88.27% 89.57% +1.30%
==========================================
Files 54 55 +1
Lines 4877 4855 -22
Branches 1374 1391 +17
==========================================
+ Hits 4305 4349 +44
+ Misses 377 322 -55
+ Partials 195 184 -11 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
dehall
left a comment
There was a problem hiding this comment.
I haven't had time to fully finish reviewing but overall it looks good. Submitting the few comments I do have now, since I'll be out Monday
…tors - Redefine Start and End operators based on clarified definitions in upcoming CQL 2.0 - Update interval operators to follow CQL spec implementation language as closely as possible - Preserve interval point types and improve arithmetic, precision, and limit handling - Expand unit, integration, and specification test coverage - Reorganize some exports and imports to avoid circular imports - NOTE: expand and collapse implementations have not yet been updated as they are considerably more complex
The logical definition and reference definition for proper contains/includes disagree. The reference definition seems more consistent to me, so I've implemented that while we ask the CQL community.
- Move pointFrom to be with other spec-defined operations - Add documentation links and quotes to pointFrom
85b5f9a to
b75ad37
Compare
- Add Jira link to comment about keeping quantity unit for min/max values - Use quantityInstance more consistently for min/max values - Remove unused maxValueForInstance and minValueForInstance functions
dehall
left a comment
There was a problem hiding this comment.
I found just a couple more places where a call to .low or .high needs to consider uncertainties to prevent errors, but overall I think this is really close. After those are addressed I'll be good to approve. Two other comments are just on comments, and maybe those are already how we want them/as good as they can be at this point.
|
Thanks for the review, @dehall. Good finds. I've addressed them now, so this is ready for re-review (again!). |
dehall
left a comment
There was a problem hiding this comment.
Looks good! Per the last comment, there's one thing I'd be ok with removing but since it's there and tested I'm also fine with leaving it in.
The custom equalInterval assertion did not work correctly for Intervals w/ uncertain boundaries. Now it does!
|
I don't know why the CI failed, but I re-ran it (without changing anything) and it passed. I thought that would update the UI here, but I'm not seeing it. Here are the updated results: https://github.com/cqframework/cql-execution/actions/runs/30477306092?pr=373 |
lmd59
left a comment
There was a problem hiding this comment.
Regression for fqm-execution looks good to me!
This PR replaces #365 by aligning (almost) all interval operators more closely with the exact language and algorithms prescribed in the spec and using the
StartandEndoperators to determine interval boundaries. In addition, interval point types are detected more accurately (usingresultTypewhere possible) to ensure accurate interval representations when both boundaries are null. As a result, handling of closed null and open null boundaries has been greatly improved.Other tangentially related improvements have been made throughout to address additional issues that arose in implementation and testing of the interval operators, especially in regard to arithmetic functions, precision, and data type limits (min/max).
Note:
Submitter:
npm run test:plusto run tests, lint, and prettier)cql4browsers.jsbuilt withnpm run build:browserifyif source changed.Reviewer:
Name: