Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-4030

Assert error during top-down optimization with Project/Filter Traits passdown and derivation

    XMLWordPrintableJSON

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.24.0
    • Component/s: None
    • Labels:
      None

      Description

      For example, with https://github.com/apache/calcite/pull/1985, and enable top-down opt by set "calcite.planner.topdown.opt=true" in saffron.properties,

      run test case SortRemoveRuleTest.removeSortOverEnumerableHashJoin, we can see:

      java.lang.AssertionError
      	at org.apache.calcite.plan.volcano.OptimizeTask$RelNodeOptTask.execute(OptimizeTask.java:232)
      	at org.apache.calcite.plan.volcano.VolcanoPlanner.findBestExp(VolcanoPlanner.java:553)
      	at org.apache.calcite.tools.Programs$RuleSetProgram.run(Programs.java:327)
      	at org.apache.calcite.prepare.PlannerImpl.transform(PlannerImpl.java:362)
      	at org.apache.calcite.rel.rules.SortRemoveRuleTest.transform(SortRemoveRuleTest.java:77)
      	at org.apache.calcite.rel.rules.SortRemoveRuleTest.removeSortOverEnumerableHashJoin(SortRemoveRuleTest.java:102)
      

      The short term workaround is to comment the assert at OptimizeTask.java:232.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hyuan Haisheng Yuan
                Reporter:
                amaliujia Rui Wang
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: