net.sf.farrago.test
Interface Rex2CalcPlanTest.Tester

All Superinterfaces:
SqlToRelTestBase.Tester
All Known Implementing Classes:
Rex2CalcPlanTest.TesterImpl
Enclosing class:
Rex2CalcPlanTest

static interface Rex2CalcPlanTest.Tester
extends SqlToRelTestBase.Tester

Test helper. The default implementation is Rex2CalcPlanTest.TesterImpl, but sub-tests can customize behavior by creating their own Tester.


Method Summary
 void check(String sql, boolean nullSemantics, boolean shortCircuit)
          Compiles a SQL statement, and compares the generated calc program with the contents of a reference file with the same name as the current test.
 void checkAgg(String sql, boolean shortCircuit)
          Compiles a SQL statement containing aggregation, and compares the generated programs (init, add, drop) with the contents of a reference file.
 void checkWinAgg(String sql, boolean shortCircuit)
          Compiles a SQL statement containing windowed aggregation, and compares the generated programs (for init, add, drop and output) with the contents of a reference file.
 
Methods inherited from interface org.eigenbase.test.SqlToRelTestBase.Tester
assertConvertsTo, convertSqlToRel, createCatalogReader, createPlanner, createRelOptSchema, createValidator, getConformance, getDiffRepos, getOperatorTable, parseQuery
 

Method Detail

check

void check(String sql,
           boolean nullSemantics,
           boolean shortCircuit)
Compiles a SQL statement, and compares the generated calc program with the contents of a reference file with the same name as the current test.

Parameters:
sql - SQL statement. Must be of the form "SELECT ... FROM ... WHERE".
nullSemantics - If true, adds logic to ensure that a WHERE clause which evalutes to NULL will filter out rows (as if it had evaluated to FALSE).
shortCircuit - Generate short-circuit logic to optimize logical operations such as AND and OR conditions.

checkWinAgg

void checkWinAgg(String sql,
                 boolean shortCircuit)
Compiles a SQL statement containing windowed aggregation, and compares the generated programs (for init, add, drop and output) with the contents of a reference file.

Parameters:
sql - SQL statement. Must be of the form "SELECT agg OVER window, agg OVER window ... FROM ... WINDOW decl".
shortCircuit - Generate short-circuit logic to optimize logical operations such as AND and OR conditions.

checkAgg

void checkAgg(String sql,
              boolean shortCircuit)
Compiles a SQL statement containing aggregation, and compares the generated programs (init, add, drop) with the contents of a reference file.

Parameters:
sql - SQL statement. Must be of the form "SELECT ... FROM ... WHERE ... GROUP BY ...".
shortCircuit - Generate short-circuit logic to optimize logical operations such as AND and OR conditions.