-
Notifications
You must be signed in to change notification settings - Fork 524
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
Check for non-numerical values in numerical data count filter #11216
base: demo-rfc80-poc
Are you sure you want to change the base?
Check for non-numerical values in numerical data count filter #11216
Conversation
6ceb4ae
to
c305493
Compare
add9f96
to
60ca4a0
Compare
<include refid="isAttributeValueNA"> | ||
<property name="attribute_value" value="${attribute_value}"/> | ||
</include> | ||
</if> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we don't need to handle NA here if this SQL is used as the non-NA part? Just curious, it's also fine to have it here. And I think it's also possible to include the NA part as a whole SQL but this is great progress already. Appreciate it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this NA part was implemented before we added the additional logic for NA.
You're right. We should probably move the NA filter logic into this same SQL as well. Might be better to deal with it in a separate PR tough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
60ca4a0
to
994c898
Compare
--> | ||
<if test="dataFilterValue.value != null"> | ||
AND ( | ||
<include refid="normalizeAttributeValue"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't do the normalizeAttributeValue. You are just testing multiple values of NA?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
normalizeAttributeValue
used to normalize values other than NA
but we got rid of that part at some point by upper casing everything. So I guess normalizing here is redundant now.
We are still doing this in multiple places where we filter categorical data. For example, see
cbioportal/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml
Lines 483 to 489 in d9459f3
<otherwise> | |
( | |
<include refid="normalizeAttributeValue"> | |
<property name="attribute_value" value="attribute_value"/> | |
</include> | |
) ILIKE #{dataFilterValue.value} | |
</otherwise> |
and
cbioportal/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml
Lines 614 to 620 in d9459f3
<otherwise> | |
( | |
<include refid="normalizeAttributeValue"> | |
<property name="attribute_value" value="value"/> | |
</include> | |
) ILIKE #{dataFilterValue.value} | |
</otherwise> |
These are also most likely redundant now, and I think we should address this duplication as well, but probably in a separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed normalizeAttributeValue
from all these 3 places. We may still want to address the code duplication for categorical filters at some point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Just had one question
994c898
to
7db8f3f
Compare
Quality Gate passedIssues Measures |
Fix #11204
This only fixes numericalClinicalDataCountFilter.Now applied the same fix to
numericalGenomicDataFilter
andnumericalGenericAssayDataFilter
as well by unifying the filter logic under one SQL.TODO: add unit tests with variety of clinical, genomic, and generic assay data filter combinations