NSAmelchev commented on code in PR #13862:
URL: https://github.com/apache/ignite/pull/13862#discussion_r4692071551
##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/metadata/ColocationGroup.java:
##########
@@ -311,6 +346,20 @@ public int[] partitions(UUID nodeId) {
if (F.isEmpty(assignments) || primaryAssignment)
return null;
+ if (partFilter >= 0)
+ return Objects.equals(nodeId,
F.first(assignments.get(partFilter))) ? new int[] {partFilter} : U.EMPTY_INTS;
Review Comment:
Can't throw: the filtered assignments are a view. Added the check anyway.
##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/trait/DistributionFunction.java:
##########
@@ -315,7 +315,7 @@ public AffinityDistribution(int cacheId, Object identity) {
AffinityAdapter<Row> aff = new
AffinityAdapter<>(affSrvc.affinity(cacheId), k.toIntArray(), ctx.rowHandler());
- return new Partitioned<>(assignments, aff);
+ return new Partitioned<>(assignments, m.nodeIds(), aff);
Review Comment:
Added PartitionPruneTest#testJoinRehash. It only adds coverage: the change
affects performance, not results.
--
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]