Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Null handling by ProperContains, ProperIncludedIn, ProperIncludes, ProperIn evaluators. #1370

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

antvaset
Copy link
Contributor

@antvaset antvaset commented Jun 20, 2024

This fixes how the ProperContains, ProperIncludedIn, ProperIncludes, ProperIn evaluators handle nulls. The CQL specification states that:

  • The T properly included in List<T> expression (ProperIn(T, List<T>) in ELM) evaluates to null if either argument is null (link).
  • Same for List<T> properly included in List<T> (ProperIncludedIn(List<T>, List<T>) in ELM).
  • List<T> properly includes T (ProperContains(List<T>, T) in ELM) evaluates to null if either argument is null (link).
  • Same for List<T> properly includes List<T> (ProperIncludes(List<T>, List<T>) in ELM).

Copy link

codecov bot commented Jun 20, 2024

Codecov Report

Attention: Patch coverage is 57.14286% with 3 lines in your changes missing coverage. Please review.

Project coverage is 62.25%. Comparing base (e00c396) to head (0f022ba).
Report is 2 commits behind head on master.

Files Patch % Lines
.../engine/elm/executing/ProperContainsEvaluator.java 50.00% 0 Missing and 1 partial ⚠️
...qf/cql/engine/elm/executing/ProperInEvaluator.java 50.00% 0 Missing and 1 partial ⚠️
.../engine/elm/executing/ProperIncludesEvaluator.java 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1370      +/-   ##
============================================
- Coverage     62.26%   62.25%   -0.01%     
+ Complexity     6951     6945       -6     
============================================
  Files           492      492              
  Lines         27727    27713      -14     
  Branches       5506     5502       -4     
============================================
- Hits          17265    17254      -11     
  Misses         8198     8198              
+ Partials       2264     2261       -3     

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

@JPercival
Copy link
Contributor

@antvaset - We have a goal of >=80% test coverage for new/updated code. Can you add tests for the Evaluators that gets the patch up to 80%?

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.

None yet

2 participants