Vladsz83 commented on code in PR #10910:
URL: https://github.com/apache/ignite/pull/10910#discussion_r1358192863


##########
modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/planner/hints/JoinOrderHintsPlannerTest.java:
##########
@@ -0,0 +1,248 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.query.calcite.planner.hints;
+
+import org.apache.calcite.rel.core.Join;
+import org.apache.calcite.rel.core.JoinRelType;
+import org.apache.calcite.rel.rules.CoreRules;
+import org.apache.calcite.rel.rules.JoinPushThroughJoinRule;
+import org.apache.ignite.internal.processors.query.calcite.hint.HintDefinition;
+import 
org.apache.ignite.internal.processors.query.calcite.planner.AbstractPlannerTest;
+import org.apache.ignite.internal.processors.query.calcite.planner.TestTable;
+import org.apache.ignite.internal.processors.query.calcite.schema.IgniteSchema;
+import 
org.apache.ignite.internal.processors.query.calcite.trait.IgniteDistributions;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.testframework.LogListener;
+import org.apache.ignite.testframework.junits.logger.GridTestLog4jLogger;
+import org.apache.logging.log4j.Level;
+import org.junit.Test;
+
+/**
+ * Planner test for join order hints.
+ */
+public class JoinOrderHintsPlannerTest extends AbstractPlannerTest {
+    /** */
+    private IgniteSchema schema;
+
+    /** {@inheritDoc} */
+    @Override protected void afterTest() throws Exception {
+        super.afterTest();
+
+        ((GridTestLog4jLogger)log).setLevel(Level.INFO);
+    }
+
+    /** {@inheritDoc} */
+    @Override public void setup() {
+        super.setup();
+
+        int tblNum = 3;
+        int fldNum = 3;
+
+        TestTable[] tables = new TestTable[tblNum];
+        Object[] fields = new Object[tblNum * 2];
+
+        for (int f = 0; f < fldNum; ++f) {
+            fields[f * 2] = "V" + (f + 1);
+            fields[f * 2 + 1] = Integer.class;
+        }
+
+        // Tables with growing records number.
+        for (int t = 0; t < tables.length; ++t) {
+            tables[t] = createTable("TBL" + (t + 1), Math.min(1_000_000, 
(int)Math.pow(10, t + 1)),
+                IgniteDistributions.broadcast(), fields);
+        }
+
+        schema = createSchema(tables);
+    }
+
+    /**
+     * Tests {@link JoinPushThroughJoinRule#RIGHT} is disabled by {@link 
HintDefinition#ORDERED_JOINS}.
+     */
+    @Test
+    public void testDisabledJoinPushThroughJoinRight() throws Exception {
+        String disabledRules =

Review Comment:
   We disable rules like MergeJoinConverter and CorrelatedNestedLoopJoin to 
simplify exposing of commuted and/or re-ordered joins without ORDERED_JOINS 
hints. Other rules may affect result plan so that it doesn't contain re-rodered 
joins. 



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