Berkof commented on a change in pull request #8421:
URL: https://github.com/apache/ignite/pull/8421#discussion_r525864662



##########
File path: 
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/prepare/Fragment.java
##########
@@ -140,12 +121,64 @@ public String serialized() {
     }
 
     /** */
-    public boolean local() {
+    public boolean rootFragment() {
         return !(root instanceof IgniteSender);
     }
 
     /** */
-    private NodesMapping localMapping(PlanningContext ctx) {
-        return new NodesMapping(Collections.singletonList(ctx.localNodeId()), 
null, NodesMapping.CLIENT);
+    public Fragment attach(PlanningContext ctx) {
+        RelOptCluster cluster = ctx.cluster();
+
+        return root.getCluster() == cluster ? this : new 
Cloner(cluster).go(this);
+    }
+
+    /** */
+    public Fragment detach() {
+        RelOptCluster cluster = PlanningContext.empty().cluster();
+
+        return root.getCluster() == cluster ? this : new 
Cloner(cluster).go(this);
+    }
+
+    /**
+     * Mapps the fragment to its data location.
+     * @param ctx Planner context.

Review comment:
       Empty line.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to