From fc9ef569988953b08b75a667ea50df2fa25a0810 Mon Sep 17 00:00:00 2001 From: Bryan Lai Date: Fri, 1 Nov 2024 12:30:40 -0400 Subject: [PATCH] add missing study filter param to clickhouse method for caching condition --- .../java/org/cbioportal/service/StudyViewColumnarService.java | 2 +- .../cbioportal/service/impl/StudyViewColumnarServiceImpl.java | 4 ++-- .../java/org/cbioportal/web/columnar/BasicDataBinner.java | 2 +- .../java/org/cbioportal/web/columnar/ClinicalDataBinner.java | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/cbioportal/service/StudyViewColumnarService.java b/src/main/java/org/cbioportal/service/StudyViewColumnarService.java index d4dafd536ca..4f13dc68f78 100644 --- a/src/main/java/org/cbioportal/service/StudyViewColumnarService.java +++ b/src/main/java/org/cbioportal/service/StudyViewColumnarService.java @@ -31,7 +31,7 @@ public interface StudyViewColumnarService { List getCnaGenes(StudyViewFilter interceptedStudyViewFilter) throws StudyNotFoundException; List getStructuralVariantGenes(StudyViewFilter studyViewFilter) throws StudyNotFoundException; - Map getClinicalAttributeDatatypeMap(); + Map getClinicalAttributeDatatypeMap(StudyViewFilter studyViewFilter); List getClinicalDataCounts(StudyViewFilter studyViewFilter, List filteredAttributes); diff --git a/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java b/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java index 2dc8881d6df..19713980486 100644 --- a/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java +++ b/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java @@ -143,7 +143,7 @@ public List getStructuralVariantGenes(StudyViewFilter stu condition = "@cacheEnabledConfig.getEnabledClickhouse() && @studyViewFilterUtil.isUnfiltered(#studyViewFilter)" ) @Override - public Map getClinicalAttributeDatatypeMap() { + public Map getClinicalAttributeDatatypeMap(StudyViewFilter studyViewFilter) { return studyViewRepository.getClinicalAttributeDatatypeMap(); } @@ -153,7 +153,7 @@ public Map getClinicalAttributeDatatypeMap() { ) @Override public List getClinicalDataCounts(StudyViewFilter studyViewFilter, List filteredAttributes) { - return studyViewRepository.getClinicalDataCounts(createContext(studyViewFilter), filteredAttributes); + return studyViewRepository.getClinicalDataCounts(createContext(studyViewFilter), filteredAttributes); } @Cacheable( diff --git a/src/main/java/org/cbioportal/web/columnar/BasicDataBinner.java b/src/main/java/org/cbioportal/web/columnar/BasicDataBinner.java index 9300f462a87..b54b4675523 100644 --- a/src/main/java/org/cbioportal/web/columnar/BasicDataBinner.java +++ b/src/main/java/org/cbioportal/web/columnar/BasicDataBinner.java @@ -112,7 +112,7 @@ public { 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()); diff --git a/src/main/java/org/cbioportal/web/columnar/ClinicalDataBinner.java b/src/main/java/org/cbioportal/web/columnar/ClinicalDataBinner.java index 7a81703fbf0..94badf1b9ca 100644 --- a/src/main/java/org/cbioportal/web/columnar/ClinicalDataBinner.java +++ b/src/main/java/org/cbioportal/web/columnar/ClinicalDataBinner.java @@ -85,7 +85,7 @@ public List fetchClinicalDataBinCounts( filteredClinicalDataCounts.stream().flatMap(c -> c.getCounts().stream()).toList() ); - Map attributeDatatypeMap = studyViewColumnarService.getClinicalAttributeDatatypeMap(); + Map attributeDatatypeMap = studyViewColumnarService.getClinicalAttributeDatatypeMap(studyViewFilter); Map> unfilteredClinicalDataByAttributeId = unfilteredClinicalData.stream().collect(Collectors.groupingBy(Binnable::getAttrId));