org.eigenbase.test
Class SqlValidatorTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.eigenbase.test.SqlValidatorTestCase
              extended by org.eigenbase.test.SqlValidatorTest
All Implemented Interfaces:
Test
Direct Known Subclasses:
SqlTestGen.SqlValidatorSpooler

public class SqlValidatorTest
extends SqlValidatorTestCase

Concrete child class of SqlValidatorTestCase, containing lots of unit tests.

If you want to run these same tests in a different environment, create a derived class whose SqlValidatorTestCase.getTester(org.eigenbase.sql.validate.SqlConformance) returns a different implementation of SqlValidatorTestCase.Tester.

Since:
Jan 14, 2004
Version:
$Id: //open/dev/farrago/src/org/eigenbase/test/SqlValidatorTest.java#91 $
Author:
Wael Chatila

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eigenbase.test.SqlValidatorTestCase
SqlValidatorTestCase.Tester, SqlValidatorTestCase.TesterImpl
 
Field Summary
private static String ANY
           
private  String ERR_IN_OPERANDS_INCOMPATIBLE
           
private  String ERR_IN_VALUES_INCOMPATIBLE
           
protected  Logger logger
           
protected static boolean todo
          Deprecated. Deprecated so that usages of this constant will show up in yellow in Intellij and maybe someone will fix them.
static boolean todoTypeInference
           
 
Fields inherited from class org.eigenbase.test.SqlValidatorTestCase
NL, tester
 
Constructor Summary
SqlValidatorTest(String name)
           
 
Method Summary
 void _testAmbiguousColumnInIn()
           
 void _testCharsetAndCollateMismatch()
           
 void _testConvertAndTranslate()
           
 void _testDyadicCollateCompare()
           
 void _testDyadicCollateOperator()
           
 void _testDyadicCompareCollateFails()
           
 void _testGroupExpressionEquivalenceCorrelated()
           
 void _testGroupExpressionEquivalenceParams()
           
 void _testJoinUsing()
           
 void _testLikeAndSimilarFails()
           
 void _testSimpleCollate()
           
 void _testSubqueryInOnClause()
           
 void _testValuesWithAggFuncs()
           
 void _testWinPartClause()
           
private  void checkNegWindow(String s, String msg)
           
protected  void checkWin(String sql, String expectedMsgPattern)
           
 void checkWinClauseExp(String sql, String expectedMsgPattern)
           
 void checkWinFuncExp(String sql, String expectedMsgPattern)
           
 void checkWinFuncExpWithWinClause(String sql, String expectedMsgPattern)
           
private  String list(String sep, String before, int count)
           
 void subTestIntervalDayNegative()
          Runs tests for INTERVAL...
 void subTestIntervalDayPositive()
          Runs tests for INTERVAL...
 void subTestIntervalDayToHourNegative()
          Runs tests for INTERVAL...
 void subTestIntervalDayToHourPositive()
           
 void subTestIntervalDayToMinuteNegative()
          Runs tests for INTERVAL...
 void subTestIntervalDayToMinutePositive()
          Runs tests for INTERVAL...
 void subTestIntervalDayToSecondNegative()
          Runs tests for INTERVAL...
 void subTestIntervalDayToSecondPositive()
          Runs tests for INTERVAL...
 void subTestIntervalHourNegative()
          Runs tests for INTERVAL...
 void subTestIntervalHourPositive()
          Runs tests for INTERVAL...
 void subTestIntervalHourToMinuteNegative()
          Runs tests for INTERVAL...
 void subTestIntervalHourToMinutePositive()
          Runs tests for INTERVAL...
 void subTestIntervalHourToSecondNegative()
          Runs tests for INTERVAL...
 void subTestIntervalHourToSecondPositive()
          Runs tests for INTERVAL...
 void subTestIntervalMinuteNegative()
          Runs tests for INTERVAL...
 void subTestIntervalMinutePositive()
          Runs tests for INTERVAL...
 void subTestIntervalMinuteToSecondNegative()
          Runs tests for INTERVAL...
 void subTestIntervalMinuteToSecondPositive()
          Runs tests for INTERVAL...
 void subTestIntervalMonthNegative()
          Runs tests for INTERVAL...
 void subTestIntervalMonthPositive()
          Runs tests for INTERVAL...
 void subTestIntervalSecondNegative()
          Runs tests for INTERVAL...
 void subTestIntervalSecondPositive()
          Runs tests for INTERVAL...
 void subTestIntervalYearNegative()
          Runs tests for INTERVAL...
 void subTestIntervalYearPositive()
          Runs tests for INTERVAL...
 void subTestIntervalYearToMonthNegative()
          Runs tests for INTERVAL...
 void subTestIntervalYearToMonthPositive()
          Runs tests for INTERVAL...
 void testAggregateInGroupByFails()
           
 void testAggregateInOrderByFails()
           
 void testAmbiguousColumn()
           
 void testAndOrIllegalTypesFails()
           
 void testArithmeticOperators()
           
 void testArithmeticOperatorsFails()
           
 void testAsColumnList()
           
 void testBetween()
           
 void testBinaryString()
           
 void testBinaryStringFails()
           
 void testBind()
           
 void testBooleans()
           
 void testCardinality()
           
 void testCaseExpression()
           
 void testCaseExpressionFails()
           
 void testCaseExpressionTypes()
           
 void testCastBinaryLiteral()
           
 void testCastFails()
           
 void testCastToInterval()
           
 void testCastTypeToType()
           
 void testCharLength()
           
 void testCharsetMismatch()
           
 void testCoalesce()
           
 void testCoalesceFails()
           
 void testCoalesceWithoutRewrite()
           
 void testCoalesceWithRewrite()
           
 void testCollect()
           
 void testCollectionTable()
           
 void testCollectionTableWithCursorParam()
           
 void testConcat()
           
 void testConcatFails()
           
 void testConcatWithCharset()
           
 void testCorrelatingVariables()
           
 void testCorrelationJoin()
           
 void testCountFunction()
           
 void testCrossJoinOnFails()
           
 void testCrossJoinUsingFails()
           
 void testDateTime()
           
 void testDateTimeCast()
          Tests casting to/from date/time types.
 void testDoubleNoAlias()
           
 void testDuplicateColumnAliasIsOK()
           
 void testDuplicateTableAliasFails()
           
 void testElement()
           
 void testEqualNotEqual()
           
 void testEqualNotEqualFails()
           
 void testExpandStar()
           
 void testExplicitTable()
           
 void testExtract()
           
 void testFloorCeil()
           
 void testFromReferenceFails()
           
 void testFunctionalDistinct()
           
 void testFusion()
           
 void testGroup()
           
 void testGroupAgg()
           
 void testGroupByCorrelatedColumnFails()
           
 void testGroupExpressionEquivalence()
           
 void testGroupExpressionEquivalenceId()
           
 void testGroupExpressionEquivalenceLiteral()
           
 void testGroupExpressionEquivalenceStringLiteral()
           
 void testHaving()
           
 void testHavingBetween()
           
 void testInlineWinDef()
           
 void testInList()
           
 void testInnerJoinWithoutUsingOrOnFails()
           
 void testInSubquery()
           
 void testIntervalCompare()
           
 void testIntervalLiterals()
           
 void testIntervalMillisConversion()
           
 void testIntervalMonthsConversion()
           
 void testIntervalOperators()
           
 void testIntervalTimeUnitEnumeration()
           
 void testInvalidFunction()
           
 void testInvalidGroupBy()
           
 void testIs()
           
 void testIsASet()
           
 void testIsFails()
           
 void testJdbcFunctionCall()
           
 void testJoinRowType()
           
 void testJoinUsing()
           
 void testJoinUsingDupColsFails()
           
 void testJoinUsingIncompatibleDatatype()
           
 void testJoinUsingInvalidColsFails()
           
 void testLarge()
          Tests a large scalar expression, which will expose any O(n^2) algorithms lurking in the validation process.
 void testLastFunction()
           
 void testLateral()
           
 void testLikeAndSimilar()
           
 void testMemberOf()
           
 void testMinMaxFunctions()
           
 void testMinusDateOperator()
           
 void testMultipleDifferentAs()
           
 void testMultipleSameAsPass()
           
 void testMultiset()
           
 void testMultisetSetOperators()
           
 void testNameResolutionInValuesClause()
           
 void testNaturalCrossJoinFails()
           
 void testNaturalJoinIncompatibleDatatype()
           
 void testNaturalJoinWithOnFails()
           
 void testNaturalJoinWithUsing()
           
 void testNestedAggFails()
           
 void testNestedFrom()
           
 void testNew()
           
 void testNotIllegalTypeFails()
           
 void testNull()
           
 void testNullCast()
           
 void testNullIf()
           
 void testNumbers()
           
 void testNumericOperators()
           
 void testObscuredAliasFails()
           
 void testOn()
           
 void testOneWinFunc()
           
 void testOrder()
           
 void testOrderGroup()
          Tests validation of the ORDER BY clause when GROUP BY is present.
 void testOrderUnion()
           
 void testOverlaps()
           
 void testOverlay()
           
 void testPartitionByExpr()
           
 void testPosition()
           
 void testPrefix()
           
 void testQuotedFunction()
           
 void testRecordType()
           
 void testRewriteWithColumnReferenceExpansion()
           
 void testRewriteWithColumnReferenceExpansionAndFromAlias()
           
 void testRewriteWithIdentifierExpansion()
           
 void testRewriteWithoutIdentifierExpansion()
           
 void testRow()
           
 void testRowtype()
           
 void testSample()
           
 void testScalars()
           
 void testScalarsFails()
           
 void testScalarSubQuery()
           
 void testSelectDistinct()
           
 void testSingleNoAlias()
           
 void testStringCompare()
           
 void testStringCompareType()
           
 void testStringLiteral()
           
 void testStringLiteralBroken()
           
 void testStructuredTypes()
           
 void testSubMultisetOf()
           
 void testSubstring()
           
 void testSubstringFails()
           
 void testTrim()
           
 void testTrimFails()
           
 void testTypeOfAs()
           
 void testTypesLiterals()
           
 void testUnionCountMismatchFails()
           
 void testUnionCountMismatcWithValuesFails()
           
 void testUnionNameResolution()
           
 void testUnionTypeMismatchFails()
           
 void testUnionTypeMismatchWithStarFails()
           
 void testUnionTypeMismatchWithValuesFails()
           
 void testUnnest()
           
 void testUpperLower()
           
 void testValuesRewrite()
           
 void testValuesTypeMismatchFails()
           
 void testWhere()
           
 void testWhereReference()
           
 void testWindowClause()
           
 void testWindowClause2()
           
 void testWindowClauseWithSubquery()
           
 void testWindowFunctions()
           
 void testWindowNegative()
           
 void testWindowPartial()
           
 
Methods inherited from class org.eigenbase.test.SqlValidatorTestCase
assertExceptionIsThrown, check, checkCharset, checkCollation, checkColumnType, checkEx, checkExp, checkExpFails, checkExpType, checkFails, checkIntervalConv, checkResultType, checkWholeExpFails, getTester
 
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
 

Field Detail

todo

protected static final boolean todo
Deprecated. Deprecated so that usages of this constant will show up in yellow in Intellij and maybe someone will fix them.
See Also:
Constant Field Values

todoTypeInference

public static final boolean todoTypeInference
See Also:
Constant Field Values

ANY

private static final String ANY
See Also:
Constant Field Values

logger

protected final Logger logger

ERR_IN_VALUES_INCOMPATIBLE

private final String ERR_IN_VALUES_INCOMPATIBLE
See Also:
Constant Field Values

ERR_IN_OPERANDS_INCOMPATIBLE

private final String ERR_IN_OPERANDS_INCOMPATIBLE
See Also:
Constant Field Values
Constructor Detail

SqlValidatorTest

public SqlValidatorTest(String name)
Method Detail

testMultipleSameAsPass

public void testMultipleSameAsPass()

testMultipleDifferentAs

public void testMultipleDifferentAs()

testTypeOfAs

public void testTypeOfAs()

testTypesLiterals

public void testTypesLiterals()

testBooleans

public void testBooleans()

testAndOrIllegalTypesFails

public void testAndOrIllegalTypesFails()

testNotIllegalTypeFails

public void testNotIllegalTypeFails()

testIs

public void testIs()

testIsFails

public void testIsFails()

testScalars

public void testScalars()

testScalarsFails

public void testScalarsFails()

testNumbers

public void testNumbers()

testPrefix

public void testPrefix()

testEqualNotEqual

public void testEqualNotEqual()

testEqualNotEqualFails

public void testEqualNotEqualFails()

testBinaryString

public void testBinaryString()

testBinaryStringFails

public void testBinaryStringFails()

testStringLiteral

public void testStringLiteral()

testStringLiteralBroken

public void testStringLiteralBroken()

testArithmeticOperators

public void testArithmeticOperators()

testArithmeticOperatorsFails

public void testArithmeticOperatorsFails()

testCaseExpression

public void testCaseExpression()

testCaseExpressionTypes

public void testCaseExpressionTypes()

testCaseExpressionFails

public void testCaseExpressionFails()

testNullIf

public void testNullIf()

testCoalesce

public void testCoalesce()

testCoalesceFails

public void testCoalesceFails()

testStringCompare

public void testStringCompare()

testStringCompareType

public void testStringCompareType()

testConcat

public void testConcat()

testConcatWithCharset

public void testConcatWithCharset()

testConcatFails

public void testConcatFails()

testBetween

public void testBetween()

testCharsetMismatch

public void testCharsetMismatch()

_testSimpleCollate

public void _testSimpleCollate()

_testCharsetAndCollateMismatch

public void _testCharsetAndCollateMismatch()

_testDyadicCollateCompare

public void _testDyadicCollateCompare()

_testDyadicCompareCollateFails

public void _testDyadicCompareCollateFails()

_testDyadicCollateOperator

public void _testDyadicCollateOperator()

testCharLength

public void testCharLength()

testUpperLower

public void testUpperLower()

testPosition

public void testPosition()

testTrim

public void testTrim()

testTrimFails

public void testTrimFails()

_testConvertAndTranslate

public void _testConvertAndTranslate()

testOverlay

public void testOverlay()

testSubstring

public void testSubstring()

testSubstringFails

public void testSubstringFails()

testLikeAndSimilar

public void testLikeAndSimilar()

_testLikeAndSimilarFails

public void _testLikeAndSimilarFails()

testNull

public void testNull()

testNullCast

public void testNullCast()

testCastTypeToType

public void testCastTypeToType()

testCastFails

public void testCastFails()

testCastBinaryLiteral

public void testCastBinaryLiteral()

testDateTime

public void testDateTime()

testDateTimeCast

public void testDateTimeCast()
Tests casting to/from date/time types.


testInvalidFunction

public void testInvalidFunction()

testJdbcFunctionCall

public void testJdbcFunctionCall()

testQuotedFunction

public void testQuotedFunction()

testRowtype

public void testRowtype()

testRow

public void testRow()

testMultiset

public void testMultiset()

testMultisetSetOperators

public void testMultisetSetOperators()

testSubMultisetOf

public void testSubMultisetOf()

testElement

public void testElement()

testMemberOf

public void testMemberOf()

testIsASet

public void testIsASet()

testCardinality

public void testCardinality()

testIntervalTimeUnitEnumeration

public void testIntervalTimeUnitEnumeration()

testIntervalMonthsConversion

public void testIntervalMonthsConversion()

testIntervalMillisConversion

public void testIntervalMillisConversion()

subTestIntervalYearPositive

public void subTestIntervalYearPositive()
Runs tests for INTERVAL... YEAR that should pass both parser and validator. A substantially identical set of tests exists in SqlParserTest, and any changes here should be synchronized there. Similarly, any changes to tests here should be echoed appropriately to each of the other 12 subTestIntervalXXXPositive() tests.


subTestIntervalYearToMonthPositive

public void subTestIntervalYearToMonthPositive()
Runs tests for INTERVAL... YEAR TO MONTH that should pass both parser and validator. A substantially identical set of tests exists in SqlParserTest, and any changes here should be synchronized there. Similarly, any changes to tests here should be echoed appropriately to each of the other 12 subTestIntervalXXXPositive() tests.


subTestIntervalMonthPositive

public void subTestIntervalMonthPositive()
Runs tests for INTERVAL... MONTH that should pass both parser and validator. A substantially identical set of tests exists in SqlParserTest, and any changes here should be synchronized there. Similarly, any changes to tests here should be echoed appropriately to each of the other 12 subTestIntervalXXXPositive() tests.


subTestIntervalDayPositive

public void subTestIntervalDayPositive()
Runs tests for INTERVAL... DAY that should pass both parser and validator. A substantially identical set of tests exists in SqlParserTest, and any changes here should be synchronized there. Similarly, any changes to tests here should be echoed appropriately to each of the other 12 subTestIntervalXXXPositive() tests.


subTestIntervalDayToHourPositive

public void subTestIntervalDayToHourPositive()

subTestIntervalDayToMinutePositive

public void subTestIntervalDayToMinutePositive()
Runs tests for INTERVAL... DAY TO MINUTE that should pass both parser and validator. A substantially identical set of tests exists in SqlParserTest, and any changes here should be synchronized there. Similarly, any changes to tests here should be echoed appropriately to each of the other 12 subTestIntervalXXXPositive() tests.


subTestIntervalDayToSecondPositive

public void subTestIntervalDayToSecondPositive()
Runs tests for INTERVAL... DAY TO SECOND that should pass both parser and validator. A substantially identical set of tests exists in SqlParserTest, and any changes here should be synchronized there. Similarly, any changes to tests here should be echoed appropriately to each of the other 12 subTestIntervalXXXPositive() tests.


subTestIntervalHourPositive

public void subTestIntervalHourPositive()
Runs tests for INTERVAL... HOUR that should pass both parser and validator. A substantially identical set of tests exists in SqlParserTest, and any changes here should be synchronized there. Similarly, any changes to tests here should be echoed appropriately to each of the other 12 subTestIntervalXXXPositive() tests.


subTestIntervalHourToMinutePositive

public void subTestIntervalHourToMinutePositive()
Runs tests for INTERVAL... HOUR TO MINUTE that should pass both parser and validator. A substantially identical set of tests exists in SqlParserTest, and any changes here should be synchronized there. Similarly, any changes to tests here should be echoed appropriately to each of the other 12 subTestIntervalXXXPositive() tests.


subTestIntervalHourToSecondPositive

public void subTestIntervalHourToSecondPositive()
Runs tests for INTERVAL... HOUR TO SECOND that should pass both parser and validator. A substantially identical set of tests exists in SqlParserTest, and any changes here should be synchronized there. Similarly, any changes to tests here should be echoed appropriately to each of the other 12 subTestIntervalXXXPositive() tests.


subTestIntervalMinutePositive

public void subTestIntervalMinutePositive()
Runs tests for INTERVAL... MINUTE that should pass both parser and validator. A substantially identical set of tests exists in SqlParserTest, and any changes here should be synchronized there. Similarly, any changes to tests here should be echoed appropriately to each of the other 12 subTestIntervalXXXPositive() tests.


subTestIntervalMinuteToSecondPositive

public void subTestIntervalMinuteToSecondPositive()
Runs tests for INTERVAL... MINUTE TO SECOND that should pass both parser and validator. A substantially identical set of tests exists in SqlParserTest, and any changes here should be synchronized there. Similarly, any changes to tests here should be echoed appropriately to each of the other 12 subTestIntervalXXXPositive() tests.


subTestIntervalSecondPositive

public void subTestIntervalSecondPositive()
Runs tests for INTERVAL... SECOND that should pass both parser and validator. A substantially identical set of tests exists in SqlParserTest, and any changes here should be synchronized there. Similarly, any changes to tests here should be echoed appropriately to each of the other 12 subTestIntervalXXXPositive() tests.


subTestIntervalYearNegative

public void subTestIntervalYearNegative()
Runs tests for INTERVAL... YEAR that should pass parser but fail validator. A substantially identical set of tests exists in SqlParserTest, and any changes here should be synchronized there. Similarly, any changes to tests here should be echoed appropriately to each of the other 12 subTestIntervalXXXNegative() tests.


subTestIntervalYearToMonthNegative

public void subTestIntervalYearToMonthNegative()
Runs tests for INTERVAL... YEAR TO MONTH that should pass parser but fail validator. A substantially identical set of tests exists in SqlParserTest, and any changes here should be synchronized there. Similarly, any changes to tests here should be echoed appropriately to each of the other 12 subTestIntervalXXXNegative() tests.


subTestIntervalMonthNegative

public void subTestIntervalMonthNegative()
Runs tests for INTERVAL... MONTH that should pass parser but fail validator. A substantially identical set of tests exists in SqlParserTest, and any changes here should be synchronized there. Similarly, any changes to tests here should be echoed appropriately to each of the other 12 subTestIntervalXXXNegative() tests.


subTestIntervalDayNegative

public void subTestIntervalDayNegative()
Runs tests for INTERVAL... DAY that should pass parser but fail validator. A substantially identical set of tests exists in SqlParserTest, and any changes here should be synchronized there. Similarly, any changes to tests here should be echoed appropriately to each of the other 12 subTestIntervalXXXNegative() tests.


subTestIntervalDayToHourNegative

public void subTestIntervalDayToHourNegative()
Runs tests for INTERVAL... DAY TO HOUR that should pass parser but fail validator. A substantially identical set of tests exists in SqlParserTest, and any changes here should be synchronized there. Similarly, any changes to tests here should be echoed appropriately to each of the other 12 subTestIntervalXXXNegative() tests.


subTestIntervalDayToMinuteNegative

public void subTestIntervalDayToMinuteNegative()
Runs tests for INTERVAL... DAY TO MINUTE that should pass parser but fail validator. A substantially identical set of tests exists in SqlParserTest, and any changes here should be synchronized there. Similarly, any changes to tests here should be echoed appropriately to each of the other 12 subTestIntervalXXXNegative() tests.


subTestIntervalDayToSecondNegative

public void subTestIntervalDayToSecondNegative()
Runs tests for INTERVAL... DAY TO SECOND that should pass parser but fail validator. A substantially identical set of tests exists in SqlParserTest, and any changes here should be synchronized there. Similarly, any changes to tests here should be echoed appropriately to each of the other 12 subTestIntervalXXXNegative() tests.


subTestIntervalHourNegative

public void subTestIntervalHourNegative()
Runs tests for INTERVAL... HOUR that should pass parser but fail validator. A substantially identical set of tests exists in SqlParserTest, and any changes here should be synchronized there. Similarly, any changes to tests here should be echoed appropriately to each of the other 12 subTestIntervalXXXNegative() tests.


subTestIntervalHourToMinuteNegative

public void subTestIntervalHourToMinuteNegative()
Runs tests for INTERVAL... HOUR TO MINUTE that should pass parser but fail validator. A substantially identical set of tests exists in SqlParserTest, and any changes here should be synchronized there. Similarly, any changes to tests here should be echoed appropriately to each of the other 12 subTestIntervalXXXNegative() tests.


subTestIntervalHourToSecondNegative

public void subTestIntervalHourToSecondNegative()
Runs tests for INTERVAL... HOUR TO SECOND that should pass parser but fail validator. A substantially identical set of tests exists in SqlParserTest, and any changes here should be synchronized there. Similarly, any changes to tests here should be echoed appropriately to each of the other 12 subTestIntervalXXXNegative() tests.


subTestIntervalMinuteNegative

public void subTestIntervalMinuteNegative()
Runs tests for INTERVAL... MINUTE that should pass parser but fail validator. A substantially identical set of tests exists in SqlParserTest, and any changes here should be synchronized there. Similarly, any changes to tests here should be echoed appropriately to each of the other 12 subTestIntervalXXXNegative() tests.


subTestIntervalMinuteToSecondNegative

public void subTestIntervalMinuteToSecondNegative()
Runs tests for INTERVAL... MINUTE TO SECOND that should pass parser but fail validator. A substantially identical set of tests exists in SqlParserTest, and any changes here should be synchronized there. Similarly, any changes to tests here should be echoed appropriately to each of the other 12 subTestIntervalXXXNegative() tests.


subTestIntervalSecondNegative

public void subTestIntervalSecondNegative()
Runs tests for INTERVAL... SECOND that should pass parser but fail validator. A substantially identical set of tests exists in SqlParserTest, and any changes here should be synchronized there. Similarly, any changes to tests here should be echoed appropriately to each of the other 12 subTestIntervalXXXNegative() tests.


testIntervalLiterals

public void testIntervalLiterals()

testIntervalOperators

public void testIntervalOperators()

testNumericOperators

public void testNumericOperators()

testFloorCeil

public void testFloorCeil()

checkWin

protected void checkWin(String sql,
                        String expectedMsgPattern)

checkWinClauseExp

public void checkWinClauseExp(String sql,
                              String expectedMsgPattern)

checkWinFuncExpWithWinClause

public void checkWinFuncExpWithWinClause(String sql,
                                         String expectedMsgPattern)

checkWinFuncExp

public void checkWinFuncExp(String sql,
                            String expectedMsgPattern)

_testWinPartClause

public void _testWinPartClause()

testWindowFunctions

public void testWindowFunctions()

testInlineWinDef

public void testInlineWinDef()

testPartitionByExpr

public void testPartitionByExpr()

testWindowClause

public void testWindowClause()

testWindowClause2

public void testWindowClause2()

testWindowClauseWithSubquery

public void testWindowClauseWithSubquery()

testWindowNegative

public void testWindowNegative()

checkNegWindow

private void checkNegWindow(String s,
                            String msg)

testWindowPartial

public void testWindowPartial()

testOneWinFunc

public void testOneWinFunc()

testNameResolutionInValuesClause

public void testNameResolutionInValuesClause()

testNestedFrom

public void testNestedFrom()

testAmbiguousColumn

public void testAmbiguousColumn()

testExpandStar

public void testExpandStar()

testAsColumnList

public void testAsColumnList()

_testAmbiguousColumnInIn

public void _testAmbiguousColumnInIn()

testInList

public void testInList()

testInSubquery

public void testInSubquery()

testDoubleNoAlias

public void testDoubleNoAlias()

testDuplicateColumnAliasIsOK

public void testDuplicateColumnAliasIsOK()

testDuplicateTableAliasFails

public void testDuplicateTableAliasFails()

testInvalidGroupBy

public void testInvalidGroupBy()

testSingleNoAlias

public void testSingleNoAlias()

testObscuredAliasFails

public void testObscuredAliasFails()

testFromReferenceFails

public void testFromReferenceFails()

testWhereReference

public void testWhereReference()

testUnionNameResolution

public void testUnionNameResolution()

testUnionCountMismatchFails

public void testUnionCountMismatchFails()

testUnionCountMismatcWithValuesFails

public void testUnionCountMismatcWithValuesFails()

testUnionTypeMismatchFails

public void testUnionTypeMismatchFails()

testUnionTypeMismatchWithStarFails

public void testUnionTypeMismatchWithStarFails()

testUnionTypeMismatchWithValuesFails

public void testUnionTypeMismatchWithValuesFails()

testValuesTypeMismatchFails

public void testValuesTypeMismatchFails()

testNaturalCrossJoinFails

public void testNaturalCrossJoinFails()

testCrossJoinUsingFails

public void testCrossJoinUsingFails()

testJoinUsing

public void testJoinUsing()

testCrossJoinOnFails

public void testCrossJoinOnFails()

testInnerJoinWithoutUsingOrOnFails

public void testInnerJoinWithoutUsingOrOnFails()

testNaturalJoinWithOnFails

public void testNaturalJoinWithOnFails()

testNaturalJoinWithUsing

public void testNaturalJoinWithUsing()

testNaturalJoinIncompatibleDatatype

public void testNaturalJoinIncompatibleDatatype()

testJoinUsingIncompatibleDatatype

public void testJoinUsingIncompatibleDatatype()

testJoinUsingInvalidColsFails

public void testJoinUsingInvalidColsFails()

testJoinUsingDupColsFails

public void testJoinUsingDupColsFails()

testJoinRowType

public void testJoinRowType()

_testJoinUsing

public void _testJoinUsing()

testWhere

public void testWhere()

testOn

public void testOn()

testHaving

public void testHaving()

testHavingBetween

public void testHavingBetween()

testLarge

public void testLarge()
Tests a large scalar expression, which will expose any O(n^2) algorithms lurking in the validation process.


list

private String list(String sep,
                    String before,
                    int count)

testOrder

public void testOrder()

testOrderUnion

public void testOrderUnion()

testOrderGroup

public void testOrderGroup()
Tests validation of the ORDER BY clause when GROUP BY is present.


testGroup

public void testGroup()

testGroupByCorrelatedColumnFails

public void testGroupByCorrelatedColumnFails()

testGroupExpressionEquivalence

public void testGroupExpressionEquivalence()

testGroupExpressionEquivalenceId

public void testGroupExpressionEquivalenceId()

_testGroupExpressionEquivalenceCorrelated

public void _testGroupExpressionEquivalenceCorrelated()

_testGroupExpressionEquivalenceParams

public void _testGroupExpressionEquivalenceParams()

testGroupExpressionEquivalenceLiteral

public void testGroupExpressionEquivalenceLiteral()

testGroupExpressionEquivalenceStringLiteral

public void testGroupExpressionEquivalenceStringLiteral()

testGroupAgg

public void testGroupAgg()

testNestedAggFails

public void testNestedAggFails()

testAggregateInGroupByFails

public void testAggregateInGroupByFails()

testAggregateInOrderByFails

public void testAggregateInOrderByFails()

testCorrelatingVariables

public void testCorrelatingVariables()

testIntervalCompare

public void testIntervalCompare()

testOverlaps

public void testOverlaps()

testExtract

public void testExtract()

testCastToInterval

public void testCastToInterval()

testMinusDateOperator

public void testMinusDateOperator()

testBind

public void testBind()

testUnnest

public void testUnnest()

testCorrelationJoin

public void testCorrelationJoin()

testStructuredTypes

public void testStructuredTypes()

testLateral

public void testLateral()

testCollect

public void testCollect()

testFusion

public void testFusion()

testCountFunction

public void testCountFunction()

testLastFunction

public void testLastFunction()

testMinMaxFunctions

public void testMinMaxFunctions()

testFunctionalDistinct

public void testFunctionalDistinct()

testSelectDistinct

public void testSelectDistinct()

testExplicitTable

public void testExplicitTable()

testCollectionTable

public void testCollectionTable()

testCollectionTableWithCursorParam

public void testCollectionTableWithCursorParam()

testScalarSubQuery

public void testScalarSubQuery()

_testSubqueryInOnClause

public void _testSubqueryInOnClause()

testRecordType

public void testRecordType()

testSample

public void testSample()

testRewriteWithoutIdentifierExpansion

public void testRewriteWithoutIdentifierExpansion()

testRewriteWithIdentifierExpansion

public void testRewriteWithIdentifierExpansion()

testRewriteWithColumnReferenceExpansion

public void testRewriteWithColumnReferenceExpansion()

testRewriteWithColumnReferenceExpansionAndFromAlias

public void testRewriteWithColumnReferenceExpansionAndFromAlias()

testCoalesceWithoutRewrite

public void testCoalesceWithoutRewrite()

testCoalesceWithRewrite

public void testCoalesceWithRewrite()

testValuesRewrite

public void testValuesRewrite()

_testValuesWithAggFuncs

public void _testValuesWithAggFuncs()

testNew

public void testNew()