alex-plekhanov commented on code in PR #10935:
URL: https://github.com/apache/ignite/pull/10935#discussion_r1328511235


##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/prepare/ExecutionPlan.java:
##########
@@ -46,4 +55,43 @@ public AffinityTopologyVersion topologyVersion() {
     public List<Fragment> fragments() {
         return fragments;
     }
+
+    /** */
+    public FragmentMapping mapping(Fragment fragment) {
+        return fragment.mapping();
+    }
+
+    /** */
+    public ColocationGroup target(Fragment fragment) {
+        if (fragment.rootFragment())
+            return null;
+
+        IgniteSender sender = (IgniteSender)fragment.root();
+        return 
mapping(sender.targetFragmentId()).findGroup(sender.exchangeId());
+    }
+
+    /** */
+    public Map<Long, List<UUID>> remotes(Fragment fragment) {
+        List<IgniteReceiver> remotes = fragment.remotes();
+
+        if (F.isEmpty(remotes))
+            return null;
+
+        HashMap<Long, List<UUID>> res = U.newHashMap(remotes.size());
+
+        for (IgniteReceiver remote : remotes)
+            res.put(remote.exchangeId(), 
mapping(remote.sourceFragmentId()).nodeIds());
+
+        return res;
+    }
+
+    /** */
+    private FragmentMapping mapping(long fragmentId) {
+        return fragments().stream()
+                .filter(f -> f.fragmentId() == fragmentId)

Review Comment:
   8 spaces indent instead of 4.



##########
modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/QueryWithPartitionsIntegrationTest.java:
##########
@@ -53,12 +52,16 @@ public class QueryWithPartitionsIntegrationTest extends 
AbstractBasicIntegration
     public boolean local;
 
     /** */
-    @Parameterized.Parameters(name = "local = {0}")
+    @Parameterized.Parameter(1)
+    public int partSz;
+
+    /** */
+    @Parameterized.Parameters(name = "local = {0}, partSz = {1}")
     public static List<Object[]> parameters() {
-        return ImmutableList.of(
-                new Object[]{true},
-                new Object[]{false}
-        );
+        return Stream.of(true, false)
+                .flatMap(isLocal -> Stream.of(1, 2, 5, 10, 20)
+                .map(i -> new Object[]{isLocal, i}))
+                .collect(Collectors.toList());

Review Comment:
   Looks like indent is wrong, should be something like: 
   ```
               .flatMap(isLocal -> Stream.of(1, 2, 5, 10, 20)
                   .map(i -> new Object[]{isLocal, i}))
               .collect(Collectors.toList());
   ```



##########
modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/QueryWithPartitionsIntegrationTest.java:
##########
@@ -53,12 +52,16 @@ public class QueryWithPartitionsIntegrationTest extends 
AbstractBasicIntegration
     public boolean local;
 
     /** */
-    @Parameterized.Parameters(name = "local = {0}")
+    @Parameterized.Parameter(1)
+    public int partSz;

Review Comment:
   `partSz` is not used.



-- 
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]

Reply via email to