Implement ProperContains/ProperIn for both List and Interval#369
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #369 +/- ##
==========================================
+ Coverage 88.30% 88.41% +0.10%
==========================================
Files 54 54
Lines 4804 4832 +28
Branches 1350 1359 +9
==========================================
+ Hits 4242 4272 +30
+ Misses 369 368 -1
+ Partials 193 192 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
cmoesel
reviewed
Jul 1, 2026
773c9cc to
cb5eb5c
Compare
Contributor
Author
lmd59
reviewed
Jul 7, 2026
lmd59
left a comment
Contributor
There was a problem hiding this comment.
After the discussion to get here, I appreciate the simplicity of the final solution. Looking good. I had one question (two related comments).
| if (typeIsArray(container)) { | ||
| return LIST.doProperContains(container, item); | ||
| } else { | ||
| if (item == null) { |
| if (typeIsArray(container)) { | ||
| return LIST.doProperContains(container, item); | ||
| } else { | ||
| if (item == null) { |
Contributor
There was a problem hiding this comment.
Same as above (is this check redundant with check in datatypes/interval.ts?)
d8295c0 to
13b7fb5
Compare
lmd59
approved these changes
Jul 8, 2026
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.
This PR implements the ProperContains and ProperIn operators, for Lists (implements #291) and Intervals (implements #292)
As of today, the spec reads as follows:
(ProperIn is just the inverse - ProperContains is
myList properly includes myItem, ProperIn ismyItem properly included in myList)However, there is an upcoming clarification to the spec that will clarify two aspects of these operators for Lists:
This PR is implemented per these clarifications.
Note also that the cql tests are being updated as part of that clarification, see cqframework/cql-tests#119 , so I have copied the latest from that PR in here. As of now that PR has a couple approvals already but if it changes again I'll re-update.
Fortunately, the spec is pretty unambiguous for the Interval operators.
Pull requests into cql-execution require the following.
Submitter and reviewer should ✔ when done.
For items that are not-applicable, mark "N/A" and ✔.
Submitter:
npm run test:plusto run tests, lint, and prettier)cql4browsers.jsbuilt withnpm run build:browserifyif source changed.Reviewer:
Name: