From 260a75aae0e483e5fa366aa7d9e88a42d3ad5fb2 Mon Sep 17 00:00:00 2001 From: Onur Sumer Date: Wed, 30 Oct 2024 16:21:24 -0400 Subject: [PATCH] use case-insensitive ILIKE instead of case-sensitive LIKE when looking for sample acquisition and specimen (#11143) --- .../mybatisclickhouse/StudyViewFilterMapper.xml | 12 ++++++------ .../mybatisclickhouse/StudyViewMapper.xml | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml index 74a2ac58cd9..841fd4abf6a 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml @@ -200,12 +200,12 @@ ced.patient_unique_id AS patient_unique_id, min(ced.start_date) AS time_taken, ced.cancer_study_identifier AS cancer_study_identifier - FROM clinical_event_derived ced - - key = 'SAMPLE_ID' - AND (event_type LIKE 'Sample Acquisition' OR event_type LIKE 'SPECIMEN') - - GROUP BY patient_unique_id, ced.value, cancer_study_identifier + FROM clinical_event_derived ced + + key = 'SAMPLE_ID' + AND (event_type ILIKE 'Sample Acquisition' OR event_type ILIKE 'SPECIMEN') + + GROUP BY patient_unique_id, ced.value, cancer_study_identifier ) ced INNER JOIN ( diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml index cbd67048194..fea1eb9853f 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml @@ -572,7 +572,7 @@ FROM clinical_event_derived ced AND key = 'SAMPLE_ID' - AND (event_type LIKE 'Sample Acquisition' OR event_type LIKE 'SPECIMEN') + AND (event_type ILIKE 'Sample Acquisition' OR event_type ILIKE 'SPECIMEN') AND concat(ced.cancer_study_identifier, '_', ced.value) IN ( ) AND @@ -611,7 +611,7 @@ FROM clinical_event_derived ced key = 'SAMPLE_ID' - AND (event_type LIKE 'Sample Acquisition' OR event_type LIKE 'SPECIMEN') + AND (event_type ILIKE 'Sample Acquisition' OR event_type ILIKE 'SPECIMEN') GROUP BY patient_unique_id, ced.value, cancer_study_identifier ),