title: There are not enough rules to produce a node with desired properties
body: <p>I would like to use calcite volcano planner to optimise a query. It doesn't work and return me the exception:</p>
  <p><strong>There are not enough rules to produce a node with desired properties: convention=NONE, sort=[]. All the inputs have relevant nodes, however the cost is still infinite.
  Root: rel#18:RelSubset#4.NONE.[]</strong></p>
  <p><strong>Original rel:</strong></p>
  <p><strong>LogicalJoin(condition=[=($0, $3)], joinType=[inner]): rowcount = 81495.22499999999, cumulative cost = {686245.725 rows, 61452.0 cpu, 0.0 io}, id = 4</strong></p>
  <p><strong>LogicalJoin(condition=[=($0, $1)], joinType=[inner]): rowcount = 543301.5, cumulative cost = {604750.5 rows, 61451.0 cpu, 0.0 io}, id = 2</strong></p>
  <p><em><strong>LogicalTableScan(table=[[CALCITE_TEST, TTLA_ONE]]): rowcount = 59.0, cumulative cost = {59.0 rows, 60.0 cpu, 0.0 io}, id = 0</strong></em></p>
  <p><em><strong>LogicalTableScan(table=[[CALCITE_TEST, TTLR_ONE]]): rowcount = 61390.0, cumulative cost = {61390.0 rows, 61391.0 cpu, 0.0 io}, id = 1</strong></em></p>
  <p><em><strong>LogicalTableScan(table=[[CALCITE_TEST, EMPTY_T]]): rowcount = 1.0, cumulative cost = {0.0 rows, 1.0 cpu, 0.0 io}, id = 3</strong></em></p>
  <p>This the code causing the issue:</p>
  <pre><code>val rootSchema = CalciteSchema.createRootSchema(true).plus
  val schema = rootSchema.add(&quot;CALCITE_TEST&quot;, new AbstractSchema())
  schema.add(&quot;TTLA_ONE&quot;, TableA())
  schema.add(&quot;EMPTY_T&quot;, TableS())
  schema.add(&quot;TTLR_ONE&quot;, TableR())
  val config = Frameworks.newConfigBuilder.defaultSchema(schema).build
  val builder = RelBuilder.create(config)
  
  val opTree: RelNode = builder
    .scan(&quot;TTLA_ONE&quot;)
    .scan(&quot;TTLR_ONE&quot;)
    .join(JoinRelType.INNER, &quot;X&quot;)
    .scan(&quot;EMPTY_T&quot;)
    .join(JoinRelType.INNER, &quot;X&quot;)
    .build()
  
  val rw = new RelWriterImpl(new PrintWriter(System.out, true))
  
  opTree.explain(rw)
  println()
  val program = HepProgram.builder
    .addRuleInstance(FilterJoinRule.FILTER_ON_JOIN).build
  
  val hepPlanner = new HepPlanner(program)
  hepPlanner.setRoot(opTree)
  hepPlanner.findBestExp.explain(rw)
  
  println()
  
  val cluster = opTree.getCluster
  val planner = cluster.getPlanner().asInstanceOf[VolcanoPlanner]
  planner.setRoot(opTree)
  
  // add rules
  planner.addRule(PruneEmptyRules.PROJECT_INSTANCE)
  //     add ConverterRule
  planner.addRule(EnumerableRules.ENUMERABLE_MERGE_JOIN_RULE)
  planner.addRule(EnumerableRules.ENUMERABLE_SORT_RULE)
  planner.addRule(EnumerableRules.ENUMERABLE_VALUES_RULE)
  planner.addRule(EnumerableRules.ENUMERABLE_PROJECT_RULE)
  planner.addRule(EnumerableRules.ENUMERABLE_FILTER_RULE)
  planner.addRule(Bindables.BINDABLE_TABLE_SCAN_RULE)
  val optimized = planner.findBestExp
  
  optimized.explain(rw)
  </code></pre>
  <p>It produces the output belove:</p>
  <pre><code>4:LogicalJoin(condition=[=($0, $3)], joinType=[inner])
    2:LogicalJoin(condition=[=($0, $1)], joinType=[inner])
      0:LogicalTableScan(table=[[CALCITE_TEST, TTLA_ONE]])
      1:LogicalTableScan(table=[[CALCITE_TEST, TTLR_ONE]])
    3:LogicalTableScan(table=[[CALCITE_TEST, EMPTY_T]])
  
  10:LogicalJoin(condition=[=($0, $3)], joinType=[inner])
    7:LogicalJoin(condition=[=($0, $1)], joinType=[inner])
      0:LogicalTableScan(table=[[CALCITE_TEST, TTLA_ONE]])
      1:LogicalTableScan(table=[[CALCITE_TEST, TTLR_ONE]])
    3:LogicalTableScan(table=[[CALCITE_TEST, EMPTY_T]])
  
  
  There are not enough rules to produce a node with desired properties: convention=NONE, sort=[]. All the inputs have relevant nodes, however the cost is still infinite.
  Root: rel#18:RelSubset#4.NONE.[]
  </code></pre>
  <p>I added some rules on the VolcanoPlanner, what can be the issue?</p>