Skip to content

Commit

Permalink
gh-3366: Address JoinIT failures (#3370)
Browse files Browse the repository at this point in the history
* fix joinITs and add defaultGraphIds to AllGraphInfo

* copyright

---------

Co-authored-by: p29876 <[email protected]>
  • Loading branch information
cn337131 and p29876 authored Feb 4, 2025
1 parent 72aeb9b commit f370d37
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2024 Crown Copyright
* Copyright 2024-2025 Crown Copyright
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -67,7 +67,7 @@ public Iterable<Element> apply(final Iterable<Element> update, final Iterable<El
// Compare the current element with all others to do a full merge
for (final Element inner : chainedResult) {
// No merge required if not in same group
if (!e.getGroup().equals(inner.getGroup()) || e.equals(inner)) {
if (!e.getGroup().equals(inner.getGroup()) || e.equals(inner) || !schema.getElement(e.getGroup()).isAggregate()) {
continue;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2024 Crown Copyright
* Copyright 2024-2025 Crown Copyright
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -40,6 +40,7 @@ public class GetAllGraphInfoHandler implements OutputOperationHandler<GetAllGrap
public static final String OP_DECLARATIONS = "operationDeclarations";
public static final String OWNER = "owner";
public static final String IS_PUBLIC = "isPublic";
public static final String DEFAULT_GRAPH_IDS = "defaultGraphIds";

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

allGraphInfo.put(DEFAULT_GRAPH_IDS, ((FederatedStore) store).getDefaultGraphIds());

return allGraphInfo;
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2024 Crown Copyright
* Copyright 2024-2025 Crown Copyright
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -48,15 +48,10 @@ public class FederatedStoreITs extends AbstractStoreITs {
new SimpleEntry<>("shouldGetAllElementsWithFilterWithoutSummarisation",
"GetAllElementsIT - count value is duplicated, elements correct otherwise"),
new SimpleEntry<>("shouldImportFromFileThenCorrectlyExportToFile", "ImportExportCsvIT - Investigate further"),
new SimpleEntry<>("shouldRightKeyOuterJoin", "JoinIT - Missing results"),
new SimpleEntry<>("shouldLeftKeyInnerJoin", "JoinIT - Missing results"),
new SimpleEntry<>("shouldRightKeyInnerJoin", "JoinIT - Missing results"),
new SimpleEntry<>("shouldRightKeyFullJoin", "JoinIT - Missing results"),
new SimpleEntry<>("shouldLeftKeyOuterJoin", "JoinIT - Missing results"),
new SimpleEntry<>("shouldReturnDuplicateEdgesWhenNoAggregationIsUsed",
"NoAggregationIT - Need to ensure that when schema has aggregation false that this is applied"),
"NoAggregationIT - Will return one from each graph as they contain the exact same elements"),
new SimpleEntry<>("shouldReturnDuplicateEntitiesWhenNoAggregationIsUsed",
"NoAggregationIT - Need to ensure that when schema has aggregation false that this is applied"),
"NoAggregationIT - Will return one from each graph as they contain the exact same elements"),
new SimpleEntry<>("shouldAggregateOnlyRequiredGroupsWithQueryTimeAggregation", "PartAggregationIT - Investigate further"),
new SimpleEntry<>("shouldAggregateOnlyRequiredGroups", "PartAggregationIT - Investigate further"),
new SimpleEntry<>("shouldApplyPostOpAggregation", "SchemaMigrationIT - Need to apply schema aggregation choices"))
Expand Down

0 comments on commit f370d37

Please sign in to comment.