Skip to content

Commit

Permalink
Merge pull request #11154 from gblaih/demo-rfc80-poc-missing-study-fi…
Browse files Browse the repository at this point in the history
…lter-param

Fix error with missing study view filter param in clickhouse method caching condition
  • Loading branch information
gblaih authored Nov 7, 2024
2 parents 80ef8c9 + fc9ef56 commit 122f4ae
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public interface StudyViewColumnarService {
List<CopyNumberCountByGene> getCnaGenes(StudyViewFilter interceptedStudyViewFilter) throws StudyNotFoundException;
List<AlterationCountByGene> getStructuralVariantGenes(StudyViewFilter studyViewFilter) throws StudyNotFoundException;

Map<String, ClinicalDataType> getClinicalAttributeDatatypeMap();
Map<String, ClinicalDataType> getClinicalAttributeDatatypeMap(StudyViewFilter studyViewFilter);

List<ClinicalDataCountItem> getClinicalDataCounts(StudyViewFilter studyViewFilter, List<String> filteredAttributes);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public List<AlterationCountByGene> getStructuralVariantGenes(StudyViewFilter stu
condition = "@cacheEnabledConfig.getEnabledClickhouse() && @studyViewFilterUtil.isUnfiltered(#studyViewFilter)"
)
@Override
public Map<String, ClinicalDataType> getClinicalAttributeDatatypeMap() {
public Map<String, ClinicalDataType> getClinicalAttributeDatatypeMap(StudyViewFilter studyViewFilter) {
return studyViewRepository.getClinicalAttributeDatatypeMap();
}

Expand All @@ -153,7 +153,7 @@ public Map<String, ClinicalDataType> getClinicalAttributeDatatypeMap() {
)
@Override
public List<ClinicalDataCountItem> getClinicalDataCounts(StudyViewFilter studyViewFilter, List<String> filteredAttributes) {
return studyViewRepository.getClinicalDataCounts(createContext(studyViewFilter), filteredAttributes);
return studyViewRepository.getClinicalDataCounts(createContext(studyViewFilter), filteredAttributes);
}

@Cacheable(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public <T extends DataBinCountFilter, S extends DataBinFilter, U extends DataBin
case ClinicalDataBinCountFilter clinicalDataBinCountFilter -> {
unfilteredClinicalDataCounts = studyViewColumnarService.getClinicalDataCounts(partialFilter, uniqueKeys);
filteredClinicalDataCounts = studyViewColumnarService.getClinicalDataCounts(studyViewFilter, uniqueKeys);
attributeDatatypeMap = studyViewColumnarService.getClinicalAttributeDatatypeMap();
attributeDatatypeMap = studyViewColumnarService.getClinicalAttributeDatatypeMap(studyViewFilter);
}
case GenomicDataBinCountFilter genomicDataBinCountFilter -> {
unfilteredClinicalDataCounts = studyViewColumnarService.getGenomicDataBinCounts(partialFilter, genomicDataBinCountFilter.getGenomicDataBinFilters());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public List<ClinicalDataBin> fetchClinicalDataBinCounts(
filteredClinicalDataCounts.stream().flatMap(c -> c.getCounts().stream()).toList()
);

Map<String, ClinicalDataType> attributeDatatypeMap = studyViewColumnarService.getClinicalAttributeDatatypeMap();
Map<String, ClinicalDataType> attributeDatatypeMap = studyViewColumnarService.getClinicalAttributeDatatypeMap(studyViewFilter);

Map<String, List<Binnable>> unfilteredClinicalDataByAttributeId =
unfilteredClinicalData.stream().collect(Collectors.groupingBy(Binnable::getAttrId));
Expand Down

0 comments on commit 122f4ae

Please sign in to comment.