alex-plekhanov commented on a change in pull request #9821:
URL: https://github.com/apache/ignite/pull/9821#discussion_r808934140
##########
File path:
modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/planner/PlannerTest.java
##########
@@ -1299,4 +1308,110 @@ public void testNotStandardFunctions() throws Exception
{
checkSplitAndSerialization(phys, publicSchema);
}
}
+
+ /** */
+ @Test
+ public void testLongPlanningTimeout() throws Exception {
+ IgniteTypeFactory f = new IgniteTypeFactory(IgniteTypeSystem.INSTANCE);
+
+ TestTable t1 = new TestTable(
+ new RelDataTypeFactory.Builder(f)
+ .add("A", f.createJavaType(Integer.class))
+ .add("B", f.createJavaType(Integer.class))
+ .build()) {
+
+ @Override public IgniteDistribution distribution() {
+ return IgniteDistributions.broadcast();
+ }
+ };
+
+ TestTable t2 = new TestTable(
+ new RelDataTypeFactory.Builder(f)
+ .add("A", f.createJavaType(Integer.class))
+ .add("C", f.createJavaType(Integer.class))
+ .build()) {
+
+ @Override public IgniteDistribution distribution() {
+ return IgniteDistributions.broadcast();
+ }
+ };
+
+ TestTable t3 = new TestTable(
+ new RelDataTypeFactory.Builder(f)
+ .add("B", f.createJavaType(Integer.class))
+ .add("C", f.createJavaType(Integer.class))
+ .build()) {
+
+ @Override public IgniteDistribution distribution() {
+ return IgniteDistributions.broadcast();
+ }
+ };
+
+ TestTable t4 = new TestTable(
+ new RelDataTypeFactory.Builder(f)
+ .add("A", f.createJavaType(Integer.class))
+ .add("C", f.createJavaType(Integer.class))
+ .build()) {
+
+ @Override public IgniteDistribution distribution() {
+ return IgniteDistributions.broadcast();
+ }
+ };
+
+ IgniteSchema publicSchema = new IgniteSchema("PUBLIC");
+
+ publicSchema.addTable("T1", t1);
+ publicSchema.addTable("T2", t2);
+ publicSchema.addTable("T3", t3);
+ publicSchema.addTable("T4", t4);
+
+ SchemaPlus schema = createRootSchema(false)
+ .add("PUBLIC", publicSchema);
+
+ String sql = "SELECT * FROM T1 JOIN T2 ON T1.A = T2.A JOIN T3 ON T3.B
= T1.B AND T3.C = T2.C JOIN T4" +
Review comment:
You can override any method used in planning and this will slow down the
rule. For example, I've tried this with Index.collation() method, and overall
it works.
--
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]