org.eigenbase.test
Class SqlToRelConverterTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.eigenbase.test.SqlToRelTestBase
              extended by org.eigenbase.test.SqlToRelConverterTest
All Implemented Interfaces:
Test

public class SqlToRelConverterTest
extends SqlToRelTestBase

Unit test for SqlToRelConverter.

Version:
$Id: //open/dev/farrago/src/org/eigenbase/test/SqlToRelConverterTest.java#59 $
Author:
jhyde

Nested Class Summary
static class SqlToRelConverterTest.RelValidityChecker
          Visitor that checks that every RelNode in a tree is valid.
 
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
SqlToRelConverterTest()
           
SqlToRelConverterTest(String name)
           
 
Method Summary
protected  void check(String sql, String plan)
           
protected  DiffRepository getDiffRepos()
          Returns the default diff repository for this test, or null if there is no repository.
 void testAggDistinct()
           
 void testAliasList()
           
 void testAliasList2()
           
 void testCase()
          Test one of the custom conversions which is recognized by the class of the operator (in this case, SqlCaseOperator).
 void testCharLength()
          Tests one of the custom conversions which is recognized by the identity of the operator (in this case, SqlStdOperatorTable.characterLengthFunc).
 void testCollectionTable()
           
 void testCollectionTableWithCursorParam()
           
 void testCorrelationJoin()
           
 void testCountNoGroup()
           
 void testElement()
           
 void testElementInValues()
           
 void testExists()
           
 void testExistsCorrelated()
           
 void testExplainAsXml()
           
 void testExplicitTable()
           
 void testGroup()
           
 void testGroupBug281()
           
 void testGroupBug281b()
           
 void testGroupExpressionsInsideAndOut()
           
 void testGroupJustOneAgg()
           
 void testHaving()
           
 void testIntegerLiteral()
           
 void testInterval()
           
 void testInUncorrelatedSubquery()
           
 void testInValueListLong()
           
 void testInValueListShort()
           
 void testIsDistinctFrom()
           
 void testIsNotDistinctFrom()
           
 void testJoinNatural()
           
 void testJoinNaturalMultipleCommonColumn()
           
 void testJoinNaturalNoCommonColumn()
           
 void testJoinOn()
           
 void testJoinUsing()
           
 void testJoinUsingCompound()
           
 void testJoinWithUnion()
           
 void testLateral()
           
 void testMultiset()
           
 void testMultisetOfColumns()
           
 void testMultisetSubquery()
           
 void testNotLike()
           
 void testOrder()
           
 void testOrderByAlias()
           
 void testOrderByAliasDoesNotOverride()
           
 void testOrderByAliasInExpr()
           
 void testOrderByAliasOverrides()
           
 void testOrderByIdenticalExpr()
           
 void testOrderByNegativeOrdinal()
           
 void testOrderByOrdinalDesc()
           
 void testOrderByOrdinalInExpr()
           
 void testOrderBySameExpr()
           
 void testOrderDistinct()
           
 void testOrderGroup()
           
 void testOrderUnion()
           
 void testOrderUnionExprs()
           
 void testOrderUnionOrdinal()
           
 void testOverAvg()
           
 void testOverAvg2()
           
 void testOverCountStar()
           
 void testOverMultiple()
           
 void testOverOrderFollowingWindow()
          Tests that a window with a FOLLOWING bound becomes BETWEEN CURRENT ROW AND FOLLOWING.
 void testOverOrderWindow()
          Tests that a window containing only ORDER BY is implicitly CURRENT ROW.
 void testSample()
           
 void testSampleBernoulli()
           
 void testSampleBernoulliQuery()
           
 void testSampleQuery()
           
 void testSampleSystem()
           
 void testSampleSystemQuery()
           
 void testSelectDistinct()
           
 void testSelectDistinctDup()
          Tests that if the clause of SELECT DISTINCT contains duplicate expressions, they are only aggregated once.
 void testSelectDistinctGroup()
           
 void testUnion()
           
 void testUnionAll()
           
 void testUnionSubquery()
           
 void testUnionValues()
           
 void testUnnest()
           
 void testUnnestSelect()
           
 void testUnnestSubquery()
           
 
Methods inherited from class org.eigenbase.test.SqlToRelTestBase
createTester
 
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

SqlToRelConverterTest

public SqlToRelConverterTest()

SqlToRelConverterTest

public SqlToRelConverterTest(String name)
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

check

protected final void check(String sql,
                           String plan)

testIntegerLiteral

public void testIntegerLiteral()

testAliasList

public void testAliasList()

testAliasList2

public void testAliasList2()

testJoinOn

public void testJoinOn()

testJoinUsing

public void testJoinUsing()

testJoinUsingCompound

public void testJoinUsingCompound()

testJoinNatural

public void testJoinNatural()

testJoinNaturalNoCommonColumn

public void testJoinNaturalNoCommonColumn()

testJoinNaturalMultipleCommonColumn

public void testJoinNaturalMultipleCommonColumn()

testJoinWithUnion

public void testJoinWithUnion()

testGroup

public void testGroup()

testGroupJustOneAgg

public void testGroupJustOneAgg()

testGroupExpressionsInsideAndOut

public void testGroupExpressionsInsideAndOut()

testHaving

public void testHaving()

testGroupBug281

public void testGroupBug281()

testGroupBug281b

public void testGroupBug281b()

testAggDistinct

public void testAggDistinct()

testSelectDistinct

public void testSelectDistinct()

testSelectDistinctGroup

public void testSelectDistinctGroup()

testSelectDistinctDup

public void testSelectDistinctDup()
Tests that if the clause of SELECT DISTINCT contains duplicate expressions, they are only aggregated once.


testOrder

public void testOrder()

testOrderByOrdinalDesc

public void testOrderByOrdinalDesc()

testOrderDistinct

public void testOrderDistinct()

testOrderByNegativeOrdinal

public void testOrderByNegativeOrdinal()

testOrderByOrdinalInExpr

public void testOrderByOrdinalInExpr()

testOrderByIdenticalExpr

public void testOrderByIdenticalExpr()

testOrderByAlias

public void testOrderByAlias()

testOrderByAliasInExpr

public void testOrderByAliasInExpr()

testOrderByAliasOverrides

public void testOrderByAliasOverrides()

testOrderByAliasDoesNotOverride

public void testOrderByAliasDoesNotOverride()

testOrderBySameExpr

public void testOrderBySameExpr()

testOrderUnion

public void testOrderUnion()

testOrderUnionOrdinal

public void testOrderUnionOrdinal()

testOrderUnionExprs

public void testOrderUnionExprs()

testOrderGroup

public void testOrderGroup()

testCountNoGroup

public void testCountNoGroup()

testExplicitTable

public void testExplicitTable()

testCollectionTable

public void testCollectionTable()

testSample

public void testSample()

testSampleQuery

public void testSampleQuery()

testSampleBernoulli

public void testSampleBernoulli()

testSampleBernoulliQuery

public void testSampleBernoulliQuery()

testSampleSystem

public void testSampleSystem()

testSampleSystemQuery

public void testSampleSystemQuery()

testCollectionTableWithCursorParam

public void testCollectionTableWithCursorParam()

testUnnest

public void testUnnest()

testUnnestSubquery

public void testUnnestSubquery()

testMultisetSubquery

public void testMultisetSubquery()

testMultiset

public void testMultiset()

testMultisetOfColumns

public void testMultisetOfColumns()

testCorrelationJoin

public void testCorrelationJoin()

testExists

public void testExists()

testExistsCorrelated

public void testExistsCorrelated()

testInValueListShort

public void testInValueListShort()

testInValueListLong

public void testInValueListLong()

testInUncorrelatedSubquery

public void testInUncorrelatedSubquery()

testUnnestSelect

public void testUnnestSelect()

testLateral

public void testLateral()

testElement

public void testElement()

testElementInValues

public void testElementInValues()

testUnionAll

public void testUnionAll()

testUnion

public void testUnion()

testUnionValues

public void testUnionValues()

testUnionSubquery

public void testUnionSubquery()

testIsDistinctFrom

public void testIsDistinctFrom()

testIsNotDistinctFrom

public void testIsNotDistinctFrom()

testNotLike

public void testNotLike()

testOverMultiple

public void testOverMultiple()

testCase

public void testCase()
Test one of the custom conversions which is recognized by the class of the operator (in this case, SqlCaseOperator).


testCharLength

public void testCharLength()
Tests one of the custom conversions which is recognized by the identity of the operator (in this case, SqlStdOperatorTable.characterLengthFunc).


testOverAvg

public void testOverAvg()

testOverAvg2

public void testOverAvg2()

testOverCountStar

public void testOverCountStar()

testOverOrderWindow

public void testOverOrderWindow()
Tests that a window containing only ORDER BY is implicitly CURRENT ROW.


testOverOrderFollowingWindow

public void testOverOrderFollowingWindow()
Tests that a window with a FOLLOWING bound becomes BETWEEN CURRENT ROW AND FOLLOWING.


testInterval

public void testInterval()

testExplainAsXml

public void testExplainAsXml()