From 75b894e9b4b8f6697c5beb3acb0f5189eba176a5 Mon Sep 17 00:00:00 2001 From: Michael Buckley Date: Fri, 27 Sep 2024 17:16:08 -0400 Subject: [PATCH] fixmes --- .../ca/uhn/fhir/jpa/search/builder/sql/SearchQueryBuilder.java | 2 -- .../ca/uhn/fhir/jpa/search/builder/sql/SearchQueryExecutor.java | 1 - .../ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchSqlTest.java | 1 - 3 files changed, 4 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/sql/SearchQueryBuilder.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/sql/SearchQueryBuilder.java index d46bbb3f83b..2ef8363f6df 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/sql/SearchQueryBuilder.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/sql/SearchQueryBuilder.java @@ -442,7 +442,6 @@ public class SearchQueryBuilder { if (mySelectPartitionId) { mySelectedResourceIdColumn = root.getResourceIdColumn(); mySelectedPartitionIdColumn = root.getPartitionIdColumn(); - // fixme reverse? mySelect.addColumns(mySelectedPartitionIdColumn, mySelectedResourceIdColumn); } else { mySelectedResourceIdColumn = root.getResourceIdColumn(); @@ -478,7 +477,6 @@ public class SearchQueryBuilder { @Nonnull public DbColumn[] toJoinColumns(DbColumn partitionIdColumn, DbColumn resourceIdColumn) { if (isIncludePartitionIdInJoins()) { - // fixme can we reverse these? return new DbColumn[] {partitionIdColumn, resourceIdColumn}; } else { return new DbColumn[] {resourceIdColumn}; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/sql/SearchQueryExecutor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/sql/SearchQueryExecutor.java index 48a1d50d6df..49cdd701531 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/sql/SearchQueryExecutor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/sql/SearchQueryExecutor.java @@ -155,7 +155,6 @@ public class SearchQueryExecutor implements ISearchQueryExecutor { if (nextRowAsArray.length == 1) { myNext = (Long) nextRowAsArray[0]; } else { - // fixme reverse Integer nextPartitionId = (Integer) nextRowAsArray[0]; myNext = (Long) nextRowAsArray[1]; } diff --git a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchSqlTest.java b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchSqlTest.java index 3cc8e9c8294..34dcf8d1ade 100644 --- a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchSqlTest.java +++ b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchSqlTest.java @@ -63,7 +63,6 @@ public class FhirResourceDaoR4SearchSqlTest extends BaseJpaR4Test { myPatientDao.search(map); assertEquals(1, myCaptureQueriesListener.countSelectQueries()); String sql = myCaptureQueriesListener.getSelectQueriesForCurrentThread().get(0).getSql(false, false); - // fixme log bug about duplicate join of string in sort when also in query assertEquals("SELECT t1.RES_ID FROM HFJ_RESOURCE t1 INNER JOIN HFJ_SPIDX_TOKEN t0 ON (t1.RES_ID = t0.RES_ID) LEFT OUTER JOIN HFJ_SPIDX_STRING t2 ON ((t1.RES_ID = t2.RES_ID) AND (t2.HASH_IDENTITY = ?)) WHERE (t0.HASH_VALUE = ?) ORDER BY t2.SP_VALUE_NORMALIZED ASC NULLS LAST", sql); }