AMashenkov commented on code in PR #1501:
URL: https://github.com/apache/ignite-3/pull/1501#discussion_r1094452630
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/metadata/ColocationGroup.java:
##########
@@ -151,18 +149,17 @@ public ColocationGroup colocate(ColocationGroup other)
throws ColocationMappingE
+ "Replicated query parts are not co-located on all
nodes");
}
- List<List<String>> assignments;
+ List<List<NodeWithTerm>> assignments;
if (this.assignments == null || other.assignments == null) {
assignments = firstNotNull(this.assignments, other.assignments);
if (assignments != null && nodeNames != null) {
- Set<String> filter = new HashSet<>(nodeNames);
- List<List<String>> assignments0 = new
ArrayList<>(assignments.size());
+ List<List<NodeWithTerm>> assignments0 = new
ArrayList<>(assignments.size());
for (int i = 0; i < assignments.size(); i++) {
- List<String> assignment = Commons.intersect(filter,
assignments.get(i));
+ List<NodeWithTerm> assignment =
filterByNodeNames(assignments.get(i), new HashSet<>(nodeNames));
Review Comment:
Let's create HashMap outside the loop.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]