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

feat: support dialectId and dialect filters in ECL evaluation #875

Merged
merged 4 commits into from
Aug 12, 2021

Conversation

cmark
Copy link
Member

@cmark cmark commented Aug 11, 2021

Use the current CodeSystem.settings.languages configuration key to detect known dialect aliases and convert them to a set of language reference set IDs.

Use the current CodeSystem.settings.languages configuration key to
detect known dialect aliases and convert them to a set of language
reference set IDs.
@cmark cmark added the feature label Aug 11, 2021
@cmark cmark requested a review from apeteri August 11, 2021 16:13
@cmark cmark self-assigned this Aug 11, 2021
@codecov-commenter
Copy link

codecov-commenter commented Aug 11, 2021

Codecov Report

Merging #875 (a4ae67b) into 8.x (5503d1c) will increase coverage by 0.04%.
The diff coverage is 83.05%.

Impacted file tree graph

@@             Coverage Diff              @@
##                8.x     #875      +/-   ##
============================================
+ Coverage     61.38%   61.42%   +0.04%     
- Complexity    11507    11528      +21     
============================================
  Files          1714     1714              
  Lines         56243    56301      +58     
  Branches       5395     5406      +11     
============================================
+ Hits          34525    34585      +60     
+ Misses        19522    19521       -1     
+ Partials       2196     2195       -1     
Impacted Files Coverage Δ
...wl/snomed/core/ecl/SnomedEclEvaluationRequest.java 82.07% <83.05%> (+4.55%) ⬆️
...om/b2international/index/es/log/Slf4jAppender.java 57.89% <0.00%> (-10.53%) ⬇️
...owowl/core/context/TerminologyResourceRequest.java 70.96% <0.00%> (-6.46%) ⬇️
...national/snowowl/core/locks/OperationLockInfo.java 43.33% <0.00%> (-3.34%) ⬇️
...nternational/snowowl/core/events/util/Promise.java 69.64% <0.00%> (-1.79%) ⬇️
.../snomed/core/ecl/SnomedEclRefinementEvaluator.java 86.43% <0.00%> (+0.26%) ⬆️
...national/index/revision/BaseRevisionBranching.java 86.36% <0.00%> (+1.29%) ⬆️
...onal/snowowl/snomed/core/tree/TerminologyTree.java 87.75% <0.00%> (+2.04%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5503d1c...a4ae67b. Read the comment docs.

@cmark cmark marked this pull request as ready for review August 11, 2021 21:16
Operator op = Operator.fromString(dialectAliasFilter.getOp());
switch (op) {
case EQUALS:
dialectQuery.should(Expressions.matchAny(key + "In", values));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit magical 🧙 The expression can break if either the keyword in the grammar or the document field names change.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I know, I wanted to spare a bunch of if statements and explicit calls to acceptableIn, preferredIn expression helper calls. 😅 Suggestions to improve this piece of code are welcome. 🙂

@cmark cmark merged commit 05f75d2 into 8.x Aug 12, 2021
@cmark cmark deleted the feature/support-ecl-1.5-dialect-filter branch August 12, 2021 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants