Class HepPlannerTest


  • public class HepPlannerTest
    extends RelOptTestBase
    HepPlannerTest is a unit test for HepPlanner. See RelOptRulesTest for an explanation of how to add tests; the tests in this class are targeted at exercising the planner, and use specific rules for convenience only, whereas the tests in that class are targeted at exercising specific rules, and use the planner for convenience only. Hence the split.
    • Constructor Detail

      • HepPlannerTest

        public HepPlannerTest()
    • Method Detail

      • getDiffRepos

        protected DiffRepository getDiffRepos()
        Description copied from class: SqlToRelTestBase
        Returns the default diff repository for this test, or null if there is no repository.

        The default implementation returns null.

        Sub-classes that want to use a diff repository can override. Sub-sub-classes can override again, inheriting test cases and overriding selected test results.

        And individual test cases can override by providing a different tester object.

        Overrides:
        getDiffRepos in class SqlToRelTestBase
        Returns:
        Diff repository
      • testRuleClass

        public void testRuleClass()
                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testRuleDescription

        public void testRuleDescription()
                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testMatchLimitOneTopDown

        public void testMatchLimitOneTopDown()
                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testMatchLimitOneBottomUp

        public void testMatchLimitOneBottomUp()
                                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testMatchUntilFixpoint

        public void testMatchUntilFixpoint()
                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testReplaceCommonSubexpression

        public void testReplaceCommonSubexpression()
                                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testCommonSubExpression

        public void testCommonSubExpression()
        Tests that if two relational expressions are equivalent, the planner notices, and only applies the rule once.
      • testSubprogram

        public void testSubprogram()
                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testGroup

        public void testGroup()
                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testGC

        public void testGC()
                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testRuleApplyCount

        public void testRuleApplyCount()
      • testMaterialization

        public void testMaterialization()
                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • checkRuleApplyCount

        private long checkRuleApplyCount​(org.apache.calcite.plan.hep.HepMatchOrder matchOrder)