-
Notifications
You must be signed in to change notification settings - Fork 605
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
Add tests for case list sample counts endpoint #10935
Conversation
src/test/java/org/cbioportal/persistence/mybatisclickhouse/CaseListSamplesCountsTest.java
Outdated
Show resolved
Hide resolved
35206fc
to
eb86894
Compare
@@ -107,11 +109,35 @@ public Map<String, ClinicalDataType> getClinicalAttributeDatatypeMap() { | |||
|
|||
return attributeDatatypeMap; | |||
} | |||
|
|||
public static List<CaseListDataCount> mergeCaseListCounts(List<CaseListDataCount> counts) { |
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.
@haynescd i'm assuming that this should go in some util? let me know the right place or if this is ok to just have it hanging out here.
FYI, i don't love that this merging is done at repository level because it suggest that the result of the underlying mapper is legitimate. it's not. the result must be merged. but i can't figure out a way to do that operation in SQL. ideally, it would be done in the mapper, but the mapper methods have no java implementation so ... what to do?
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.
So, I would suggest doing this at the service layer.
Creating a class CaseListService? Or whatever where this logic lived.
And the Repository would return getCaseListDataCountsPerStudy()
That way the mapper is still correct and you can do the business logic of merging in the service layer
Small unused import but everything else looks good |
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
7e1819a
to
a74cade
Compare
|
* Add tests for case list sample counts endpoint and fix merge of lists across studies
No description provided.