alex-plekhanov commented on a change in pull request #9758:
URL: https://github.com/apache/ignite/pull/9758#discussion_r795447059



##########
File path: 
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/prepare/MappingQueryContext.java
##########
@@ -45,4 +53,16 @@ public UUID localNodeId() {
     public AffinityTopologyVersion topologyVersion() {
         return topVer;
     }
+
+    /** Creates a cluster. */
+    RelOptCluster cluster() {
+        if (cluster == null) {
+            cluster = 
RelOptCluster.create(Commons.emptyCluster().getPlanner(), 
Commons.emptyCluster().getRexBuilder());

Review comment:
       > I've tried to add the check to your PR code and found 2 tests failed 
because planner registers schema in empty cluster. (empty Cluster -> 
VolcanoPlanner -> registeredSchemas).
   
   Hmm, when I add assert to the `registerSchema` there are a lot of tests 
failed, because this method is invoked in TableScan rel creation, and this rel 
is created even when attached to the empty cluster (while cloning rels, while 
creating it on remote nodes from JSON, etc). I override this method for the 
empty planner as no-op, please have a look again.




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