From bc234ee7fe96dba69aa9fa2f240f0777f6f1cbb5 Mon Sep 17 00:00:00 2001 From: Luciano Fiandesio Date: Thu, 9 Jan 2025 17:20:24 +0100 Subject: [PATCH] Address review comments --- .../analytics/common/ProgramIndicatorSubqueryBuilder.java | 4 ++-- .../event/data/JdbcEnrollmentAnalyticsManager.java | 6 +++--- .../DefaultProgramIndicatorSubqueryBuilder.java | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/common/ProgramIndicatorSubqueryBuilder.java b/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/common/ProgramIndicatorSubqueryBuilder.java index 4da3ca38da3..b022ab6a967 100644 --- a/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/common/ProgramIndicatorSubqueryBuilder.java +++ b/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/common/ProgramIndicatorSubqueryBuilder.java @@ -102,14 +102,14 @@ String getAggregateClauseForProgramIndicator( Date earliestStartDate, Date latestDate); - void contributeCTE( + void contributeCte( ProgramIndicator programIndicator, AnalyticsType outerSqlEntity, Date earliestStartDate, Date latestDate, CteContext cteContext); - void contributeCTE( + void contributeCte( ProgramIndicator programIndicator, RelationshipType relationshipType, AnalyticsType outerSqlEntity, diff --git a/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/JdbcEnrollmentAnalyticsManager.java b/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/JdbcEnrollmentAnalyticsManager.java index 871659722b1..4789060e61b 100644 --- a/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/JdbcEnrollmentAnalyticsManager.java +++ b/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/JdbcEnrollmentAnalyticsManager.java @@ -706,9 +706,9 @@ protected ColumnAndAlias getCoordinateColumn(QueryItem item, String suffix) { return ColumnAndAlias.EMPTY; } + @Override protected String getColumnWithCte(QueryItem item, String suffix, CteContext cteContext) { List columns = new ArrayList<>(); - String colName = item.getItemName(); CteDefinition cteDef = cteContext.getDefinitionByItemUid(computeKey(item)); int programStageOffset = computeRowNumberOffset(item.getProgramStageOffset()); @@ -938,7 +938,7 @@ private void handleProgramIndicatorCte( QueryItem item, CteContext cteContext, EventQueryParams params) { ProgramIndicator pi = (ProgramIndicator) item.getItem(); if (item.hasRelationshipType()) { - programIndicatorSubqueryBuilder.contributeCTE( + programIndicatorSubqueryBuilder.contributeCte( pi, item.getRelationshipType(), getAnalyticsType(), @@ -946,7 +946,7 @@ private void handleProgramIndicatorCte( params.getLatestEndDate(), cteContext); } else { - programIndicatorSubqueryBuilder.contributeCTE( + programIndicatorSubqueryBuilder.contributeCte( pi, getAnalyticsType(), params.getEarliestStartDate(), diff --git a/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/programindicator/DefaultProgramIndicatorSubqueryBuilder.java b/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/programindicator/DefaultProgramIndicatorSubqueryBuilder.java index ce7193dc4c5..916d635d4fb 100644 --- a/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/programindicator/DefaultProgramIndicatorSubqueryBuilder.java +++ b/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/programindicator/DefaultProgramIndicatorSubqueryBuilder.java @@ -78,18 +78,18 @@ public String getAggregateClauseForProgramIndicator( } @Override - public void contributeCTE( + public void contributeCte( ProgramIndicator programIndicator, AnalyticsType outerSqlEntity, Date earliestStartDate, Date latestDate, CteContext cteContext) { - contributeCTE( + contributeCte( programIndicator, null, outerSqlEntity, earliestStartDate, latestDate, cteContext); } @Override - public void contributeCTE( + public void contributeCte( ProgramIndicator programIndicator, RelationshipType relationshipType, AnalyticsType outerSqlEntity,