From a5f1a39b6fe06842457b16759eb2f218934c4bbc Mon Sep 17 00:00:00 2001 From: Onur Sumer Date: Tue, 10 Dec 2024 11:21:39 -0500 Subject: [PATCH 1/2] fix CNA query for genomic data filter --- .../persistence/mybatisclickhouse/StudyViewFilterMapper.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml index 0839283a1d2..30f3c7557b4 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml @@ -702,7 +702,7 @@ WITH cna_query AS ( - SELECT sample_unique_id, alteration_value + SELECT sample_unique_id as sampleUniqueId, alteration_value FROM genetic_alteration_derived WHERE profile_type = #{genomicDataFilter.profileType} AND hugo_gene_symbol = #{genomicDataFilter.hugoGeneSymbol} @@ -714,7 +714,7 @@ SELECT DISTINCT sd.sample_unique_id FROM sample_derived sd - LEFT JOIN cna_query ON sd.sample_unique_id = cna_query.sample_unique_id + LEFT JOIN cna_query ON sd.sample_unique_id = cna_query.sampleUniqueId WHERE cancer_study_identifier IN #{studyId} From 43c2bbaab60e701b0a9216ad844409b94119f808 Mon Sep 17 00:00:00 2001 From: Onur Sumer Date: Tue, 10 Dec 2024 12:27:29 -0500 Subject: [PATCH 2/2] rename one of the cna_query statements to cna_count_query to avoid table name clash --- .../persistence/mybatisclickhouse/StudyViewMapper.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml index d91ff582ffe..e140fd00b6d 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml @@ -258,7 +258,7 @@