org.eigenbase.test
Class RelOptTestBase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.eigenbase.test.SqlToRelTestBase
              extended by org.eigenbase.test.RelOptTestBase
All Implemented Interfaces:
Test
Direct Known Subclasses:
HepPlannerTest, RelOptRulesTest

abstract class RelOptTestBase
extends SqlToRelTestBase

RelOptTestBase is an abstract base for tests which exercise a planner and/or rules via DiffRepository.

Version:
$Id: //open/dev/farrago/src/org/eigenbase/test/RelOptTestBase.java#10 $
Author:
John V. Sichi

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eigenbase.test.SqlToRelTestBase
SqlToRelTestBase.MockRelOptSchema, SqlToRelTestBase.Tester, SqlToRelTestBase.TesterImpl
 
Field Summary
 
Fields inherited from class org.eigenbase.test.SqlToRelTestBase
NL, tester
 
Constructor Summary
RelOptTestBase()
           
 
Method Summary
protected  void checkPlanning(HepProgram preProgram, RelOptPlanner planner, 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(HepProgram preProgram, RelOptRule rule, 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(HepProgram program, String sql)
          Checks the plan for a SQL statement before/after executing a given program.
protected  void checkPlanning(RelOptPlanner planner, String sql)
          Checks the plan for a SQL statement before/after executing a given planner.
protected  void checkPlanning(RelOptRule rule, String sql)
          Checks the plan for a SQL statement before/after executing a given rule.
protected static HepProgram createProgram(RelOptRule... rules)
          Creates a program which is a sequence of rules.
 
Methods inherited from class org.eigenbase.test.SqlToRelTestBase
createTester, getDiffRepos
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RelOptTestBase

RelOptTestBase()
Method Detail

checkPlanning

protected void checkPlanning(RelOptRule rule,
                             String sql)
Checks the plan for a SQL statement before/after executing a given rule.

Parameters:
rule - Planner rule
sql - SQL query

checkPlanning

protected void checkPlanning(HepProgram program,
                             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(RelOptPlanner planner,
                             String sql)
Checks the plan for a SQL statement before/after executing a given planner.

Parameters:
planner - Planner
sql - SQL query

checkPlanning

protected void checkPlanning(HepProgram preProgram,
                             RelOptRule rule,
                             String sql)
Checks the plan for a SQL statement before/after executing a given rule, with a pre-program to prepare the tree.

Parameters:
preProgram - Program to execute before comparing before state
rule - Planner rule
sql - SQL query

checkPlanning

protected void checkPlanning(HepProgram preProgram,
                             RelOptPlanner planner,
                             String sql)
Checks the plan for a SQL statement before/after executing a given rule, with a pre-program to prepare the tree.

Parameters:
preProgram - Program to execute before comparing before state
planner - Planner
sql - SQL query

createProgram

protected static HepProgram createProgram(RelOptRule... rules)
Creates a program which is a sequence of rules.

Parameters:
rules - Sequence of rules
Returns:
Program