Skip to content

Commit f370d37

Browse files
cn337131p29876
andauthored
gh-3366: Address JoinIT failures (#3370)
* fix joinITs and add defaultGraphIds to AllGraphInfo * copyright --------- Co-authored-by: p29876 <[email protected]>
1 parent 72aeb9b commit f370d37

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

store-implementation/simple-federated-store/src/main/java/uk/gov/gchq/gaffer/federated/simple/merge/operator/ElementAggregateOperator.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2024 Crown Copyright
2+
* Copyright 2024-2025 Crown Copyright
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -67,7 +67,7 @@ public Iterable<Element> apply(final Iterable<Element> update, final Iterable<El
6767
// Compare the current element with all others to do a full merge
6868
for (final Element inner : chainedResult) {
6969
// No merge required if not in same group
70-
if (!e.getGroup().equals(inner.getGroup()) || e.equals(inner)) {
70+
if (!e.getGroup().equals(inner.getGroup()) || e.equals(inner) || !schema.getElement(e.getGroup()).isAggregate()) {
7171
continue;
7272
}
7373

store-implementation/simple-federated-store/src/main/java/uk/gov/gchq/gaffer/federated/simple/operation/handler/get/GetAllGraphInfoHandler.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2024 Crown Copyright
2+
* Copyright 2024-2025 Crown Copyright
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -40,6 +40,7 @@ public class GetAllGraphInfoHandler implements OutputOperationHandler<GetAllGrap
4040
public static final String OP_DECLARATIONS = "operationDeclarations";
4141
public static final String OWNER = "owner";
4242
public static final String IS_PUBLIC = "isPublic";
43+
public static final String DEFAULT_GRAPH_IDS = "defaultGraphIds";
4344

4445
@Override
4546
public Map<String, Object> doOperation(final GetAllGraphInfo operation, final Context context, final Store store)
@@ -70,6 +71,8 @@ public Map<String, Object> doOperation(final GetAllGraphInfo operation, final Co
7071
allGraphInfo.put(graph.getConfig().getGraphId(), graphInfo);
7172
});
7273

74+
allGraphInfo.put(DEFAULT_GRAPH_IDS, ((FederatedStore) store).getDefaultGraphIds());
75+
7376
return allGraphInfo;
7477
}
7578
}

store-implementation/simple-federated-store/src/test/java/uk/gov/gchq/gaffer/federated/simple/integration/FederatedStoreITs.java

+3-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2024 Crown Copyright
2+
* Copyright 2024-2025 Crown Copyright
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -48,15 +48,10 @@ public class FederatedStoreITs extends AbstractStoreITs {
4848
new SimpleEntry<>("shouldGetAllElementsWithFilterWithoutSummarisation",
4949
"GetAllElementsIT - count value is duplicated, elements correct otherwise"),
5050
new SimpleEntry<>("shouldImportFromFileThenCorrectlyExportToFile", "ImportExportCsvIT - Investigate further"),
51-
new SimpleEntry<>("shouldRightKeyOuterJoin", "JoinIT - Missing results"),
52-
new SimpleEntry<>("shouldLeftKeyInnerJoin", "JoinIT - Missing results"),
53-
new SimpleEntry<>("shouldRightKeyInnerJoin", "JoinIT - Missing results"),
54-
new SimpleEntry<>("shouldRightKeyFullJoin", "JoinIT - Missing results"),
55-
new SimpleEntry<>("shouldLeftKeyOuterJoin", "JoinIT - Missing results"),
5651
new SimpleEntry<>("shouldReturnDuplicateEdgesWhenNoAggregationIsUsed",
57-
"NoAggregationIT - Need to ensure that when schema has aggregation false that this is applied"),
52+
"NoAggregationIT - Will return one from each graph as they contain the exact same elements"),
5853
new SimpleEntry<>("shouldReturnDuplicateEntitiesWhenNoAggregationIsUsed",
59-
"NoAggregationIT - Need to ensure that when schema has aggregation false that this is applied"),
54+
"NoAggregationIT - Will return one from each graph as they contain the exact same elements"),
6055
new SimpleEntry<>("shouldAggregateOnlyRequiredGroupsWithQueryTimeAggregation", "PartAggregationIT - Investigate further"),
6156
new SimpleEntry<>("shouldAggregateOnlyRequiredGroups", "PartAggregationIT - Investigate further"),
6257
new SimpleEntry<>("shouldApplyPostOpAggregation", "SchemaMigrationIT - Need to apply schema aggregation choices"))

0 commit comments

Comments
 (0)