org.eigenbase.sql.parser
Class SqlParserTest
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
org.eigenbase.sql.parser.SqlParserTest
- All Implemented Interfaces:
- Test
- Direct Known Subclasses:
- SqlUnParserTest
public class SqlParserTest
- extends TestCase
A SqlParserTest
is a unit-test for the SQL
parser
.
- Since:
- Mar 19, 2003
- Version:
- $Id: //open/dev/farrago/src/org/eigenbase/sql/parser/SqlParserTest.java#63 $
- Author:
- jhyde
Method Summary |
void |
_testDerivedColumnList()
|
void |
_testDerivedColumnListInJoin()
|
void |
_testDerivedColumnListNoAs()
|
void |
_testDerivedColumnListWithAlias()
|
void |
_testEmbeddedCall()
|
void |
_testEmbeddedFunction()
|
void |
_testJoinAssociativity()
|
protected void |
check(String sql,
String expected)
|
protected void |
checkExp(String sql,
String expected)
|
protected void |
checkExpFails(String sql,
String expectedMsgPattern)
Tests that an expression throws an exception which matches the given
pattern. |
protected void |
checkExpSame(String sql)
|
protected void |
checkFails(String sql,
String expectedMsgPattern)
|
protected SqlParserImpl |
getParserImpl()
|
protected SqlParserTest.Tester |
getTester()
|
protected SqlNode |
parseExpression(String sql)
|
protected SqlNode |
parseStmt(String sql)
|
void |
subTestIntervalDayFailsValidation()
Runs tests for INTERVAL... |
void |
subTestIntervalDayPositive()
Runs tests for INTERVAL... |
void |
subTestIntervalDayToHourFailsValidation()
Runs tests for INTERVAL... |
void |
subTestIntervalDayToHourPositive()
Runs tests for INTERVAL... |
void |
subTestIntervalDayToMinuteFailsValidation()
Runs tests for INTERVAL... |
void |
subTestIntervalDayToMinutePositive()
Runs tests for INTERVAL... |
void |
subTestIntervalDayToSecondFailsValidation()
Runs tests for INTERVAL... |
void |
subTestIntervalDayToSecondPositive()
Runs tests for INTERVAL... |
void |
subTestIntervalHourFailsValidation()
Runs tests for INTERVAL... |
void |
subTestIntervalHourPositive()
Runs tests for INTERVAL... |
void |
subTestIntervalHourToMinuteFailsValidation()
Runs tests for INTERVAL... |
void |
subTestIntervalHourToMinutePositive()
Runs tests for INTERVAL... |
void |
subTestIntervalHourToSecondFailsValidation()
Runs tests for INTERVAL... |
void |
subTestIntervalHourToSecondPositive()
Runs tests for INTERVAL... |
void |
subTestIntervalMinuteFailsValidation()
Runs tests for INTERVAL... |
void |
subTestIntervalMinutePositive()
Runs tests for INTERVAL... |
void |
subTestIntervalMinuteToSecondFailsValidation()
Runs tests for INTERVAL... |
void |
subTestIntervalMinuteToSecondPositive()
Runs tests for INTERVAL... |
void |
subTestIntervalMonthFailsValidation()
Runs tests for INTERVAL... |
void |
subTestIntervalMonthPositive()
Runs tests for INTERVAL... |
void |
subTestIntervalSecondFailsValidation()
Runs tests for INTERVAL... |
void |
subTestIntervalSecondPositive()
Runs tests for INTERVAL... |
void |
subTestIntervalYearFailsValidation()
Runs tests for INTERVAL... |
void |
subTestIntervalYearPositive()
Runs tests for INTERVAL... |
void |
subTestIntervalYearToMonthFailsValidation()
Runs tests for INTERVAL... |
void |
subTestIntervalYearToMonthPositive()
Runs tests for INTERVAL... |
void |
testAddCarets()
|
void |
testArthimeticOperators()
|
void |
testAs()
|
void |
testAsAliases()
|
void |
testBangEqualIsBad()
|
void |
testBetween()
|
void |
testBitStringNotImplemented()
|
void |
testBooleanPrecedenceAndAssociativity()
|
void |
testCardinalityFunc()
|
void |
testCaseExpression()
|
void |
testCaseExpressionFails()
|
void |
testCast()
|
void |
testCastFails()
|
void |
testCastToInterval()
|
void |
testCharLength()
|
void |
testCoalesce()
|
void |
testCollectionTable()
|
void |
testCollectionTableWithColumnListParam()
|
void |
testCollectionTableWithCursorParam()
|
void |
testColumnAliasWithAs()
|
void |
testColumnAliasWithoutAs()
|
void |
testConcat()
|
void |
testContinuedLiteral()
|
void |
testConvertAndTranslate()
|
void |
testDateMinusDate()
|
void |
testDateTimeCast()
Tests for casting to/from date/time types. |
void |
testDelete()
|
void |
testDeleteWhere()
|
void |
testElementFunc()
|
void |
testEmbeddedDate()
|
void |
testEmbeddedTime()
|
void |
testEmbeddedTimestamp()
|
void |
testEmptyValues()
|
void |
testEqualNotEqual()
|
void |
testExcept()
|
void |
testExceptionCleanup()
Tests that when there is an error, non-reserved keywords such as "A",
"ABSOLUTE" (which naturally arise whenver a production uses
"<IDENTIFIER>") are removed, but reserved words such as "AND"
remain. |
void |
testExists()
|
void |
testExistsInWhere()
|
void |
testExplain()
|
void |
testExplainInsert()
|
void |
testExplainWithImpl()
|
void |
testExplainWithoutImpl()
|
void |
testExplainWithType()
|
void |
testExplicitTable()
|
void |
testExplicitTableOrdered()
|
void |
testExtract()
|
void |
testFoo()
|
void |
testFromValues()
|
void |
testFromValuesWithoutParens()
|
void |
testFromWithAs()
|
void |
testFullInnerJoinFails()
|
void |
testFullOuterJoin()
|
void |
testFunction()
|
void |
testFunctionInFunction()
|
void |
testFunctionWithDistinct()
|
void |
testGroup()
|
void |
testGroupEmpty()
|
void |
testHavingAfterGroup()
|
void |
testHavingBeforeGroupFails()
|
void |
testHavingNoGroup()
|
void |
testHexAndBinaryString()
|
void |
testHexAndBinaryStringFails()
|
void |
testIdentifier()
|
void |
testIllegalCursors()
|
void |
testIllegalUnicodeEscape()
|
void |
testInList()
|
void |
testInListEmptyFails()
|
void |
testInnerOuterJoinFails()
|
void |
testInQuery()
|
void |
testInsertColumnList()
|
void |
testInsertSelect()
|
void |
testInsertUnion()
|
void |
testInsertValues()
|
void |
testInSetop()
|
void |
testIntersect()
|
void |
testIntervalArithmetics()
|
void |
testIntervalCompare()
|
void |
testIntervalLiterals()
Runs tests for each of the thirteen different main types of INTERVAL
qualifiers (YEAR, YEAR TO MONTH, etc.) Tests in this section fall into
two categories:
xxxPositive: tests that should pass parser and validator
xxxFailsValidation: tests that should pass parser but fail validator
A substantially identical set of tests exists in SqlValidatorTest, and
any changes here should be synchronized there. |
void |
testIntervalOperators()
|
void |
testInvalidToken()
|
void |
testIsASet()
|
void |
testIsBooleanPrecedenceAndAssociativity()
|
void |
testIsBooleans()
|
void |
testIsDistinctFrom()
|
void |
testIsNotDistinct()
|
void |
testJdbcFunctionCall()
|
void |
testJoinCross()
|
void |
testJoinOn()
|
void |
testJoinQuery()
|
void |
testJoinUsing()
|
void |
testLikeAndSimilar()
|
void |
testLiteral()
|
void |
testLiteralCollate()
|
void |
testLongIdentifiers()
|
void |
testMemberOf()
|
void |
testMergeSelectSource()
|
void |
testMergeTableRefSource()
|
void |
testMetadata()
|
void |
testMinusPrefixInExpression()
|
void |
testMiscIntervalQualifier()
|
void |
testMixedFrom()
|
void |
testMixedStar()
|
void |
testMultilineComment()
|
void |
testMultiset()
|
void |
testMultisetCast()
|
void |
testMultisetExcept()
|
void |
testMultisetIntersect()
|
void |
testMultisetMixed()
|
void |
testMultisetUnion()
|
void |
testNaturalCrossJoin()
|
void |
testNestedSelect()
|
void |
testNewSpecification()
|
void |
testNot()
|
void |
testNotExists()
|
void |
testNullIf()
|
void |
testOperateOnColumn()
|
void |
testOrder()
|
void |
testOrderIllegalInExpression()
|
void |
testOrderInternal()
|
void |
testOuterJoinNoiseword()
|
void |
testOver()
|
void |
testOverlaps()
|
void |
testOverlay()
|
void |
testParensInFrom()
|
void |
testParseNumber()
|
void |
testParseNumberFails()
|
void |
testPosition()
|
void |
testPrecedence0()
|
void |
testPrecedence1()
|
void |
testPrecedence2()
|
void |
testPrecedence3()
|
void |
testPrecedence4()
|
void |
testPrecedence5()
|
void |
testPrecedenceSetOps()
|
void |
testProcedureCall()
|
void |
testQueryInFrom()
|
void |
testQueryInIllegalContext()
In modern SQL, a query can occur almost everywhere that an expression
can. |
void |
testQuotedFunction()
Tests that you can't quote the names of builtin functions. |
void |
testQuotesInString()
|
void |
testReverseSolidus()
|
void |
testRow()
|
void |
testScalarQueryInSelect()
|
void |
testScalarQueryInWhere()
|
void |
testSelectAll()
|
void |
testSelectDistinct()
|
void |
testSelectFromBareExplicitTableFails()
|
void |
testSelectFromExplicitTable()
|
void |
testSelectList()
|
void |
testSelectList3()
|
void |
testSelectList4()
|
void |
testSqlInlineComment()
|
void |
testStar()
|
void |
testStringLiteral()
|
void |
testStringLiteralChain()
|
void |
testStringLiteralFails()
|
void |
testSubMultisetrOf()
|
void |
testSubstring()
|
void |
testTableSample()
|
void |
testTabStop()
|
void |
testTimeDate()
|
void |
testTrim()
|
void |
testUnicodeEscapedLiteral()
|
void |
testUnicodeLiteral()
|
void |
testUnion()
|
void |
testUnionOfNonQueryFails()
|
void |
testUnionOrder()
|
void |
testUnnest()
|
void |
testUnparseableIntervalQualifiers()
|
void |
testValues()
|
void |
testValuesExplicitRow()
|
void |
testWhere()
|
void |
testWindowInSubquery()
|
void |
testWindowReference()
|
void |
testWindowSpec()
|
void |
testWindowSpecPartial()
|
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 |
NL
protected static final String NL
ANY
private static final String ANY
- See Also:
- Constant Field Values
SqlParserTest
public SqlParserTest(String name)
getTester
protected SqlParserTest.Tester getTester()
check
protected void check(String sql,
String expected)
parseStmt
protected SqlNode parseStmt(String sql)
throws SqlParseException
- Throws:
SqlParseException
checkExp
protected void checkExp(String sql,
String expected)
parseExpression
protected SqlNode parseExpression(String sql)
throws SqlParseException
- Throws:
SqlParseException
getParserImpl
protected SqlParserImpl getParserImpl()
checkExpSame
protected void checkExpSame(String sql)
checkFails
protected void checkFails(String sql,
String expectedMsgPattern)
checkExpFails
protected void checkExpFails(String sql,
String expectedMsgPattern)
- Tests that an expression throws an exception which matches the given
pattern.
testExceptionCleanup
public void testExceptionCleanup()
- Tests that when there is an error, non-reserved keywords such as "A",
"ABSOLUTE" (which naturally arise whenver a production uses
"<IDENTIFIER>") are removed, but reserved words such as "AND"
remain.
testInvalidToken
public void testInvalidToken()
_testDerivedColumnList
public void _testDerivedColumnList()
_testDerivedColumnListInJoin
public void _testDerivedColumnListInJoin()
_testDerivedColumnListNoAs
public void _testDerivedColumnListNoAs()
_testDerivedColumnListWithAlias
public void _testDerivedColumnListWithAlias()
_testEmbeddedCall
public void _testEmbeddedCall()
_testEmbeddedFunction
public void _testEmbeddedFunction()
testColumnAliasWithAs
public void testColumnAliasWithAs()
testColumnAliasWithoutAs
public void testColumnAliasWithoutAs()
testEmbeddedDate
public void testEmbeddedDate()
testEmbeddedTime
public void testEmbeddedTime()
testEmbeddedTimestamp
public void testEmbeddedTimestamp()
testNot
public void testNot()
testBooleanPrecedenceAndAssociativity
public void testBooleanPrecedenceAndAssociativity()
testIsBooleans
public void testIsBooleans()
testIsBooleanPrecedenceAndAssociativity
public void testIsBooleanPrecedenceAndAssociativity()
testEqualNotEqual
public void testEqualNotEqual()
testBangEqualIsBad
public void testBangEqualIsBad()
testBetween
public void testBetween()
testOperateOnColumn
public void testOperateOnColumn()
testRow
public void testRow()
testOverlaps
public void testOverlaps()
testIsDistinctFrom
public void testIsDistinctFrom()
testIsNotDistinct
public void testIsNotDistinct()
testCast
public void testCast()
testCastFails
public void testCastFails()
testLikeAndSimilar
public void testLikeAndSimilar()
testFoo
public void testFoo()
testArthimeticOperators
public void testArthimeticOperators()
testExists
public void testExists()
testExistsInWhere
public void testExistsInWhere()
testFromWithAs
public void testFromWithAs()
testConcat
public void testConcat()
testReverseSolidus
public void testReverseSolidus()
testSubstring
public void testSubstring()
testFunction
public void testFunction()
testFunctionWithDistinct
public void testFunctionWithDistinct()
testFunctionInFunction
public void testFunctionInFunction()
testGroup
public void testGroup()
testGroupEmpty
public void testGroupEmpty()
testHavingAfterGroup
public void testHavingAfterGroup()
testHavingBeforeGroupFails
public void testHavingBeforeGroupFails()
testHavingNoGroup
public void testHavingNoGroup()
testIdentifier
public void testIdentifier()
testInList
public void testInList()
testInListEmptyFails
public void testInListEmptyFails()
testInQuery
public void testInQuery()
testInSetop
public void testInSetop()
testUnion
public void testUnion()
testUnionOrder
public void testUnionOrder()
testUnionOfNonQueryFails
public void testUnionOfNonQueryFails()
testQueryInIllegalContext
public void testQueryInIllegalContext()
- In modern SQL, a query can occur almost everywhere that an expression
can. This test tests the few exceptions.
testExcept
public void testExcept()
testIntersect
public void testIntersect()
testJoinCross
public void testJoinCross()
testJoinOn
public void testJoinOn()
testOuterJoinNoiseword
public void testOuterJoinNoiseword()
testJoinQuery
public void testJoinQuery()
testFullInnerJoinFails
public void testFullInnerJoinFails()
testFullOuterJoin
public void testFullOuterJoin()
testInnerOuterJoinFails
public void testInnerOuterJoinFails()
_testJoinAssociativity
public void _testJoinAssociativity()
testNaturalCrossJoin
public void testNaturalCrossJoin()
testJoinUsing
public void testJoinUsing()
testTableSample
public void testTableSample()
testLiteral
public void testLiteral()
testContinuedLiteral
public void testContinuedLiteral()
testMixedFrom
public void testMixedFrom()
testMixedStar
public void testMixedStar()
testNotExists
public void testNotExists()
testOrder
public void testOrder()
testOrderInternal
public void testOrderInternal()
testOrderIllegalInExpression
public void testOrderIllegalInExpression()
testSqlInlineComment
public void testSqlInlineComment()
testMultilineComment
public void testMultilineComment()
testParseNumber
public void testParseNumber()
testParseNumberFails
public void testParseNumberFails()
testMinusPrefixInExpression
public void testMinusPrefixInExpression()
testPrecedence0
public void testPrecedence0()
testPrecedence1
public void testPrecedence1()
testPrecedence2
public void testPrecedence2()
testPrecedence3
public void testPrecedence3()
testPrecedence4
public void testPrecedence4()
testPrecedence5
public void testPrecedence5()
testPrecedenceSetOps
public void testPrecedenceSetOps()
testQueryInFrom
public void testQueryInFrom()
testQuotesInString
public void testQuotesInString()
testScalarQueryInWhere
public void testScalarQueryInWhere()
testScalarQueryInSelect
public void testScalarQueryInSelect()
testSelectList
public void testSelectList()
testSelectList3
public void testSelectList3()
testSelectList4
public void testSelectList4()
testStar
public void testStar()
testSelectDistinct
public void testSelectDistinct()
testSelectAll
public void testSelectAll()
testWhere
public void testWhere()
testNestedSelect
public void testNestedSelect()
testValues
public void testValues()
testValuesExplicitRow
public void testValuesExplicitRow()
testFromValues
public void testFromValues()
testFromValuesWithoutParens
public void testFromValuesWithoutParens()
testEmptyValues
public void testEmptyValues()
testExplicitTable
public void testExplicitTable()
testExplicitTableOrdered
public void testExplicitTableOrdered()
testSelectFromExplicitTable
public void testSelectFromExplicitTable()
testSelectFromBareExplicitTableFails
public void testSelectFromBareExplicitTableFails()
testCollectionTable
public void testCollectionTable()
testCollectionTableWithCursorParam
public void testCollectionTableWithCursorParam()
testCollectionTableWithColumnListParam
public void testCollectionTableWithColumnListParam()
testIllegalCursors
public void testIllegalCursors()
testExplain
public void testExplain()
testExplainWithImpl
public void testExplainWithImpl()
testExplainWithoutImpl
public void testExplainWithoutImpl()
testExplainWithType
public void testExplainWithType()
testInsertSelect
public void testInsertSelect()
testInsertUnion
public void testInsertUnion()
testInsertValues
public void testInsertValues()
testInsertColumnList
public void testInsertColumnList()
testExplainInsert
public void testExplainInsert()
testDelete
public void testDelete()
testDeleteWhere
public void testDeleteWhere()
testMergeSelectSource
public void testMergeSelectSource()
testMergeTableRefSource
public void testMergeTableRefSource()
testBitStringNotImplemented
public void testBitStringNotImplemented()
testHexAndBinaryString
public void testHexAndBinaryString()
testHexAndBinaryStringFails
public void testHexAndBinaryStringFails()
testStringLiteral
public void testStringLiteral()
testStringLiteralFails
public void testStringLiteralFails()
testStringLiteralChain
public void testStringLiteralChain()
testCaseExpression
public void testCaseExpression()
testCaseExpressionFails
public void testCaseExpressionFails()
testNullIf
public void testNullIf()
testCoalesce
public void testCoalesce()
testLiteralCollate
public void testLiteralCollate()
testCharLength
public void testCharLength()
testPosition
public void testPosition()
testTimeDate
public void testTimeDate()
testDateTimeCast
public void testDateTimeCast()
- Tests for casting to/from date/time types.
testTrim
public void testTrim()
testConvertAndTranslate
public void testConvertAndTranslate()
testOverlay
public void testOverlay()
testJdbcFunctionCall
public void testJdbcFunctionCall()
testWindowReference
public void testWindowReference()
testWindowInSubquery
public void testWindowInSubquery()
testWindowSpec
public void testWindowSpec()
testWindowSpecPartial
public void testWindowSpecPartial()
testAs
public void testAs()
testAsAliases
public void testAsAliases()
testOver
public void testOver()
testElementFunc
public void testElementFunc()
testCardinalityFunc
public void testCardinalityFunc()
testMemberOf
public void testMemberOf()
testSubMultisetrOf
public void testSubMultisetrOf()
testIsASet
public void testIsASet()
testMultiset
public void testMultiset()
testMultisetUnion
public void testMultisetUnion()
testMultisetExcept
public void testMultisetExcept()
testMultisetIntersect
public void testMultisetIntersect()
testMultisetMixed
public void testMultisetMixed()
subTestIntervalYearPositive
public void subTestIntervalYearPositive()
- Runs tests for INTERVAL... YEAR that should pass both parser and
validator. A substantially identical set of tests exists in
SqlValidatorTest, 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
SqlValidatorTest, 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
SqlValidatorTest, 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
SqlValidatorTest, 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()
- Runs tests for INTERVAL... DAY TO HOUR that should pass both parser and
validator. A substantially identical set of tests exists in
SqlValidatorTest, 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.
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
SqlValidatorTest, 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
SqlValidatorTest, 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
SqlValidatorTest, 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
SqlValidatorTest, 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
SqlValidatorTest, 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
SqlValidatorTest, 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
SqlValidatorTest, 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
SqlValidatorTest, 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.
subTestIntervalYearFailsValidation
public void subTestIntervalYearFailsValidation()
- Runs tests for INTERVAL... YEAR that should pass parser but fail
validator. A substantially identical set of tests exists in
SqlValidatorTest, and any changes here should be synchronized there.
Similarly, any changes to tests here should be echoed appropriately to
each of the other 12 subTestIntervalXXXFailsValidation() tests.
subTestIntervalYearToMonthFailsValidation
public void subTestIntervalYearToMonthFailsValidation()
- Runs tests for INTERVAL... YEAR TO MONTH that should pass parser but fail
validator. A substantially identical set of tests exists in
SqlValidatorTest, and any changes here should be synchronized there.
Similarly, any changes to tests here should be echoed appropriately to
each of the other 12 subTestIntervalXXXFailsValidation() tests.
subTestIntervalMonthFailsValidation
public void subTestIntervalMonthFailsValidation()
- Runs tests for INTERVAL... MONTH that should pass parser but fail
validator. A substantially identical set of tests exists in
SqlValidatorTest, and any changes here should be synchronized there.
Similarly, any changes to tests here should be echoed appropriately to
each of the other 12 subTestIntervalXXXFailsValidation() tests.
subTestIntervalDayFailsValidation
public void subTestIntervalDayFailsValidation()
- Runs tests for INTERVAL... DAY that should pass parser but fail
validator. A substantially identical set of tests exists in
SqlValidatorTest, and any changes here should be synchronized there.
Similarly, any changes to tests here should be echoed appropriately to
each of the other 12 subTestIntervalXXXFailsValidation() tests.
subTestIntervalDayToHourFailsValidation
public void subTestIntervalDayToHourFailsValidation()
- Runs tests for INTERVAL... DAY TO HOUR that should pass parser but fail
validator. A substantially identical set of tests exists in
SqlValidatorTest, and any changes here should be synchronized there.
Similarly, any changes to tests here should be echoed appropriately to
each of the other 12 subTestIntervalXXXFailsValidation() tests.
subTestIntervalDayToMinuteFailsValidation
public void subTestIntervalDayToMinuteFailsValidation()
- Runs tests for INTERVAL... DAY TO MINUTE that should pass parser but fail
validator. A substantially identical set of tests exists in
SqlValidatorTest, and any changes here should be synchronized there.
Similarly, any changes to tests here should be echoed appropriately to
each of the other 12 subTestIntervalXXXFailsValidation() tests.
subTestIntervalDayToSecondFailsValidation
public void subTestIntervalDayToSecondFailsValidation()
- Runs tests for INTERVAL... DAY TO SECOND that should pass parser but fail
validator. A substantially identical set of tests exists in
SqlValidatorTest, and any changes here should be synchronized there.
Similarly, any changes to tests here should be echoed appropriately to
each of the other 12 subTestIntervalXXXFailsValidation() tests.
subTestIntervalHourFailsValidation
public void subTestIntervalHourFailsValidation()
- Runs tests for INTERVAL... HOUR that should pass parser but fail
validator. A substantially identical set of tests exists in
SqlValidatorTest, and any changes here should be synchronized there.
Similarly, any changes to tests here should be echoed appropriately to
each of the other 12 subTestIntervalXXXFailsValidation() tests.
subTestIntervalHourToMinuteFailsValidation
public void subTestIntervalHourToMinuteFailsValidation()
- Runs tests for INTERVAL... HOUR TO MINUTE that should pass parser but
fail validator. A substantially identical set of tests exists in
SqlValidatorTest, and any changes here should be synchronized there.
Similarly, any changes to tests here should be echoed appropriately to
each of the other 12 subTestIntervalXXXFailsValidation() tests.
subTestIntervalHourToSecondFailsValidation
public void subTestIntervalHourToSecondFailsValidation()
- Runs tests for INTERVAL... HOUR TO SECOND that should pass parser but
fail validator. A substantially identical set of tests exists in
SqlValidatorTest, and any changes here should be synchronized there.
Similarly, any changes to tests here should be echoed appropriately to
each of the other 12 subTestIntervalXXXFailsValidation() tests.
subTestIntervalMinuteFailsValidation
public void subTestIntervalMinuteFailsValidation()
- Runs tests for INTERVAL... MINUTE that should pass parser but fail
validator. A substantially identical set of tests exists in
SqlValidatorTest, and any changes here should be synchronized there.
Similarly, any changes to tests here should be echoed appropriately to
each of the other 12 subTestIntervalXXXFailsValidation() tests.
subTestIntervalMinuteToSecondFailsValidation
public void subTestIntervalMinuteToSecondFailsValidation()
- Runs tests for INTERVAL... MINUTE TO SECOND that should pass parser but
fail validator. A substantially identical set of tests exists in
SqlValidatorTest, and any changes here should be synchronized there.
Similarly, any changes to tests here should be echoed appropriately to
each of the other 12 subTestIntervalXXXFailsValidation() tests.
subTestIntervalSecondFailsValidation
public void subTestIntervalSecondFailsValidation()
- Runs tests for INTERVAL... SECOND that should pass parser but fail
validator. A substantially identical set of tests exists in
SqlValidatorTest, and any changes here should be synchronized there.
Similarly, any changes to tests here should be echoed appropriately to
each of the other 12 subTestIntervalXXXFailsValidation() tests.
testIntervalLiterals
public void testIntervalLiterals()
- Runs tests for each of the thirteen different main types of INTERVAL
qualifiers (YEAR, YEAR TO MONTH, etc.) Tests in this section fall into
two categories:
- xxxPositive: tests that should pass parser and validator
- xxxFailsValidation: tests that should pass parser but fail validator
A substantially identical set of tests exists in SqlValidatorTest, and
any changes here should be synchronized there.
testUnparseableIntervalQualifiers
public void testUnparseableIntervalQualifiers()
testMiscIntervalQualifier
public void testMiscIntervalQualifier()
testIntervalOperators
public void testIntervalOperators()
testDateMinusDate
public void testDateMinusDate()
testExtract
public void testExtract()
testIntervalArithmetics
public void testIntervalArithmetics()
testIntervalCompare
public void testIntervalCompare()
testCastToInterval
public void testCastToInterval()
testUnnest
public void testUnnest()
testParensInFrom
public void testParensInFrom()
testProcedureCall
public void testProcedureCall()
testNewSpecification
public void testNewSpecification()
testMultisetCast
public void testMultisetCast()
testAddCarets
public void testAddCarets()
testMetadata
public void testMetadata()
testTabStop
public void testTabStop()
testLongIdentifiers
public void testLongIdentifiers()
testQuotedFunction
public void testQuotedFunction()
- Tests that you can't quote the names of builtin functions.
- See Also:
SqlValidatorTest.testQuotedFunction()
testUnicodeLiteral
public void testUnicodeLiteral()
testUnicodeEscapedLiteral
public void testUnicodeEscapedLiteral()
testIllegalUnicodeEscape
public void testIllegalUnicodeEscape()