Skip to content

Update ProperContains evaluator implementation#1393

Merged
JPercival merged 6 commits intomasterfrom
update-proper-contains-evaluator-implementation
Aug 1, 2024
Merged

Update ProperContains evaluator implementation#1393
JPercival merged 6 commits intomasterfrom
update-proper-contains-evaluator-implementation

Conversation

@antvaset
Copy link
Copy Markdown
Contributor

@antvaset antvaset commented Jul 30, 2024

This PR includes the following changes related to ProperContains:

  1. Fix the ProperContainsNullRightFalse and ProperContainsNullRightTrue tests to make sure they are parsed as ProperContains(List<T>, T) (to match the test name/group). Without null as String, the expressions
{'s', 'u', 'n'} properly includes null
{'s', 'u', 'n', null} properly includes null

were parsed as ProperIncludes(List<T>, List<T>).

  1. Set the expected values of the library-based ProperContainsTimeNull and ProperInTimeNull tests to null to match those of the XML-based ProperContainsTimeNull (link) and ProperInTimeNull (link).

  2. Update implementation of ProperContains evaluator to match the spec (link).

  3. Add tests covering the edge cases in the ProperContains logic.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jul 30, 2024

Formatting check succeeded!

@codecov
Copy link
Copy Markdown

codecov bot commented Jul 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.73%. Comparing base (0670c4a) to head (f2095cb).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1393      +/-   ##
============================================
+ Coverage     63.70%   63.73%   +0.03%     
+ Complexity     2666     2665       -1     
============================================
  Files           493      493              
  Lines         27750    27774      +24     
  Branches       5513     5521       +8     
============================================
+ Hits          17677    17703      +26     
  Misses         7830     7830              
+ Partials       2243     2241       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@antvaset antvaset marked this pull request as ready for review July 30, 2024 06:42
@brynrhodes
Copy link
Copy Markdown
Member

This looks good @antvaset , my only question is is there a corresponding PR against the cql-tests repository to update these tests?

@antvaset antvaset mentioned this pull request Jul 31, 2024
@antvaset
Copy link
Copy Markdown
Contributor Author

Depends on cqframework/cql-tests#40

@antvaset
Copy link
Copy Markdown
Contributor Author

This looks good @antvaset , my only question is is there a corresponding PR against the cql-tests repository to update these tests?

Hi @brynrhodes, thanks for having a look! I've opened cqframework/cql-tests#40 in cql-tests to add the new tests for both ProperContains and ProperIn. The new tests for ProperIn in that PR all pass this updated implementation (see #1394).

@JPercival JPercival enabled auto-merge (squash) August 1, 2024 20:05
@JPercival JPercival merged commit 7e91478 into master Aug 1, 2024
@JPercival JPercival deleted the update-proper-contains-evaluator-implementation branch August 1, 2024 20:11
@antvaset
Copy link
Copy Markdown
Contributor Author

Note also cqframework/cql-tests#48 and #1394.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants