diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml index 95e66f20d3c..4fb339978e2 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml @@ -27,7 +27,7 @@ LEFT JOIN sample_list sl on sll.list_id=sl.list_id WHERE - sl.stable_id LIKE '%_${list}' + sl.stable_id LIKE concat('%_', #{list}) ) @@ -49,7 +49,7 @@ AND - gp.stable_id LIKE '%_${genomicProfileId}' + gp.stable_id LIKE concat('%_', #{genomicProfileId}) @@ -63,7 +63,7 @@ FROM sample_derived WHERE sample_unique_id IN - '${sampleIdentifier.studyId}_${sampleIdentifier.sampleId}' + concat(#{sampleIdentifier.studyId}, '_', #{sampleIdentifier.sampleId}) @@ -83,7 +83,7 @@ '', - '${sampleIdentifier.studyId}_${sampleIdentifier.sampleId}' + concat(#{sampleIdentifier.studyId}, '_', #{sampleIdentifier.sampleId}) ) @@ -94,7 +94,7 @@ OR sample_unique_id NOT IN ( - '${sampleIdentifier.studyId}_${sampleIdentifier.sampleId}' + concat(#{sampleIdentifier.studyId}, '_', #{sampleIdentifier.sampleId}) ) @@ -218,7 +218,7 @@ ) ced_inner ON ced_inner.patient_unique_id = ced.patient_unique_id - ced_inner.treatment = '${sampleTreatmentFilter.treatment}' + ced_inner.treatment = #{sampleTreatmentFilter.treatment} AND ced.time_taken <= ced_inner.treatment_time_taken @@ -232,6 +232,7 @@ GROUP BY patient_unique_id, ced.sample_id, ced.time_taken, ced.cancer_study_identifier, ced_inner.treatment, ced_inner.treatment_time_taken + @@ -241,8 +242,8 @@ SELECT patient_unique_id FROM clinical_event_derived - event_type = '${dataFilterValue.value}' + + event_type = #{dataFilterValue.value} ) @@ -262,7 +263,7 @@ separator=") OR (" close=")"> lower(event_type) = 'treatment' AND key = 'AGENT' - AND value = '${patientTreatmentFilter.treatment}' + AND value = #{patientTreatmentFilter.treatment} ) @@ -361,7 +362,7 @@ SELECT ${unique_id} FROM ${table_name} - WHERE attribute_name = '${clinicalDataFilter.attributeId}' AND + WHERE attribute_name = #{clinicalDataFilter.attributeId} AND type='${type}' @@ -388,7 +389,7 @@ , - cast(${dataFilterValue.start} as float) + cast(#{dataFilterValue.start} as float) ) ) < exp(-11) @@ -397,13 +398,13 @@ AND - > cast(${dataFilterValue.start} as float) + > cast(#{dataFilterValue.start} as float) AND - <= cast(${dataFilterValue.end} as float) + <= cast(#{dataFilterValue.end} as float) @@ -417,11 +418,10 @@ SELECT sample_unique_id, patient_unique_id, attribute_value FROM clinical_data_derived - WHERE attribute_name = '${clinicalDataFilter.attributeId}' AND type='${type}' + WHERE attribute_name = #{clinicalDataFilter.attributeId} AND type='${type}' AND cancer_study_identifier IN #{studyId} - @@ -454,7 +454,7 @@ - ) ILIKE '${dataFilterValue.value}' + ) ILIKE #{dataFilterValue.value} @@ -511,7 +511,7 @@ , - ${dataFilterValue.start} + #{dataFilterValue.start} ) ) < exp(-11) @@ -520,13 +520,13 @@ AND - > ${dataFilterValue.start} + > #{dataFilterValue.start} AND - <= ${dataFilterValue.end} + <= #{dataFilterValue.end} @@ -619,7 +619,7 @@ , - ${dataFilterValue.start} + #{dataFilterValue.start} ) ) < exp(-11) @@ -628,13 +628,13 @@ AND - > ${dataFilterValue.start} + > #{dataFilterValue.start} AND - <= ${dataFilterValue.end} + <= #{dataFilterValue.end} @@ -664,7 +664,7 @@ - ) ILIKE '${dataFilterValue.value}' + ) ILIKE #{dataFilterValue.value} diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml index 4b9e3cb83c3..7ed1c05f8d3 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml @@ -17,7 +17,7 @@ - ORDER BY sample_stable_id ASC; + ORDER BY sample_stable_id ASC @@ -70,7 +70,7 @@ - GROUP BY entrez_gene_id, hugo_gene_symbol, alteration, cytoband; + GROUP BY entrez_gene_id, hugo_gene_symbol, alteration, cytoband @@ -439,21 +439,21 @@ FROM sample_to_gene_panel_derived stgp INNER JOIN gene_panel_to_gene_derived gptg on stgp.gene_panel_id = gptg.gene_panel_id - stgp.alteration_type = '${alterationType}' + stgp.alteration_type = #{alterationType} AND stgp.gene_panel_id != 'WES' AND - GROUP BY gptg.gene; + GROUP BY gptg.gene