From 8ecc7728c7ac27afcdf8252979d2052bb21bcef8 Mon Sep 17 00:00:00 2001 From: Michael Buckley Date: Fri, 27 Sep 2024 17:08:37 -0400 Subject: [PATCH] changelog --- .../hapi/fhir/changelog/7_6_0/6325_partitioned_search.yaml | 4 ++++ .../uhn/fhir/jpa/search/builder/sql/SearchQueryExecutor.java | 3 +-- .../java/ca/uhn/fhir/jpa/model/config/PartitionSettings.java | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_6_0/6325_partitioned_search.yaml diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_6_0/6325_partitioned_search.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_6_0/6325_partitioned_search.yaml new file mode 100644 index 00000000000..099795b771c --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_6_0/6325_partitioned_search.yaml @@ -0,0 +1,4 @@ +--- +type: add +issue: 6325 +title: "Add support for including the partitioning column in search query joins." 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 fd4d1dec215..48a1d50d6df 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 @@ -157,8 +157,7 @@ public class SearchQueryExecutor implements ISearchQueryExecutor { } else { // fixme reverse Integer nextPartitionId = (Integer) nextRowAsArray[0]; - Long nextResourceId = (Long) nextRowAsArray[1]; - myNext = nextResourceId; + myNext = (Long) nextRowAsArray[1]; } } } diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/config/PartitionSettings.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/config/PartitionSettings.java index 374a18ddd94..96aba5a4308 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/config/PartitionSettings.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/config/PartitionSettings.java @@ -39,7 +39,7 @@ public class PartitionSettings { /** * Is the table partition column (usually PARTITION_ID) - * participating and primary and foreign keys. + * participating in primary and foreign keys. * Affects sql joins, sql in() expressions, etc. */ public boolean isPartitionIdsInPrimaryKeys() {