Class RelOptTestBase

    • Constructor Summary

      Constructors 
      Constructor Description
      RelOptTestBase()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void checkPlanning​(org.apache.calcite.plan.hep.HepProgram program, java.lang.String sql)
      Checks the plan for a SQL statement before/after executing a given program.
      protected void checkPlanning​(org.apache.calcite.plan.hep.HepProgram program, java.lang.String sql, boolean typeCoercion)
      Checks the plan for a SQL statement before/after executing a given program, but with specified implicit type coercion flag.
      protected void checkPlanning​(org.apache.calcite.plan.RelOptPlanner planner, java.lang.String sql)
      Checks the plan for a SQL statement before/after executing a given planner.
      protected void checkPlanning​(org.apache.calcite.plan.RelOptRule rule, java.lang.String sql)
      Checks the plan for a SQL statement before/after executing a given rule.
      protected void checkPlanning​(SqlToRelTestBase.Tester tester, org.apache.calcite.plan.hep.HepProgram preProgram, org.apache.calcite.plan.RelOptPlanner planner, java.lang.String sql)
      Checks the plan for a SQL statement before/after executing a given rule, with a pre-program to prepare the tree.
      protected void checkPlanning​(SqlToRelTestBase.Tester tester, org.apache.calcite.plan.hep.HepProgram preProgram, org.apache.calcite.plan.RelOptPlanner planner, java.lang.String sql, boolean unchanged)
      Checks the plan for a SQL statement before/after executing a given rule, with a pre-program to prepare the tree.
      protected void checkPlanningDynamic​(java.lang.String sql)
      Checks the plan for a SQL statement before/after executing a given rule.
      protected void checkPlanningDynamic​(org.apache.calcite.plan.RelOptRule rule, java.lang.String sql)
      Checks the plan for a SQL statement before/after executing a given rule.
      protected void checkPlanUnchanged​(org.apache.calcite.plan.RelOptPlanner planner, java.lang.String sql)
      Checks that the plan is the same before and after executing a given planner.
      protected SqlToRelTestBase.Tester createDynamicTester()  
      protected SqlToRelTestBase.Tester createTester()  
      (package private) RelOptTestBase.Sql sql​(java.lang.String sql)
      Sets the SQL statement for a test.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RelOptTestBase

        RelOptTestBase()
    • Method Detail

      • checkPlanning

        protected void checkPlanning​(org.apache.calcite.plan.RelOptRule rule,
                                     java.lang.String sql)
        Checks the plan for a SQL statement before/after executing a given rule.
        Parameters:
        rule - Planner rule
        sql - SQL query
      • checkPlanningDynamic

        protected void checkPlanningDynamic​(org.apache.calcite.plan.RelOptRule rule,
                                            java.lang.String sql)
        Checks the plan for a SQL statement before/after executing a given rule.
        Parameters:
        rule - Planner rule
        sql - SQL query
      • checkPlanningDynamic

        protected void checkPlanningDynamic​(java.lang.String sql)
        Checks the plan for a SQL statement before/after executing a given rule.
        Parameters:
        sql - SQL query
      • checkPlanning

        protected void checkPlanning​(org.apache.calcite.plan.hep.HepProgram program,
                                     java.lang.String sql)
        Checks the plan for a SQL statement before/after executing a given program.
        Parameters:
        program - Planner program
        sql - SQL query
      • checkPlanning

        protected void checkPlanning​(org.apache.calcite.plan.hep.HepProgram program,
                                     java.lang.String sql,
                                     boolean typeCoercion)
        Checks the plan for a SQL statement before/after executing a given program, but with specified implicit type coercion flag.
        Parameters:
        program - Planner program
        sql - SQL query
        typeCoercion - Whether to open up the implicit type coercion
      • checkPlanning

        protected void checkPlanning​(org.apache.calcite.plan.RelOptPlanner planner,
                                     java.lang.String sql)
        Checks the plan for a SQL statement before/after executing a given planner.
        Parameters:
        planner - Planner
        sql - SQL query
      • checkPlanUnchanged

        protected void checkPlanUnchanged​(org.apache.calcite.plan.RelOptPlanner planner,
                                          java.lang.String sql)
        Checks that the plan is the same before and after executing a given planner. Useful for checking circumstances where rules should not fire.
        Parameters:
        planner - Planner
        sql - SQL query
      • checkPlanning

        protected void checkPlanning​(SqlToRelTestBase.Tester tester,
                                     org.apache.calcite.plan.hep.HepProgram preProgram,
                                     org.apache.calcite.plan.RelOptPlanner planner,
                                     java.lang.String sql)
        Checks the plan for a SQL statement before/after executing a given rule, with a pre-program to prepare the tree.
        Parameters:
        tester - Tester
        preProgram - Program to execute before comparing before state
        planner - Planner
        sql - SQL query
      • checkPlanning

        protected void checkPlanning​(SqlToRelTestBase.Tester tester,
                                     org.apache.calcite.plan.hep.HepProgram preProgram,
                                     org.apache.calcite.plan.RelOptPlanner planner,
                                     java.lang.String sql,
                                     boolean unchanged)
        Checks the plan for a SQL statement before/after executing a given rule, with a pre-program to prepare the tree.
        Parameters:
        tester - Tester
        preProgram - Program to execute before comparing before state
        planner - Planner
        sql - SQL query
        unchanged - Whether the rule is to have no effect
      • sql

        RelOptTestBase.Sql sql​(java.lang.String sql)
        Sets the SQL statement for a test.