Package org.apache.calcite.test
Class SqlValidatorTest
- java.lang.Object
-
- org.apache.calcite.test.SqlValidatorTestCase
-
- org.apache.calcite.test.SqlValidatorTest
-
- Direct Known Subclasses:
SqlTestGen.SqlValidatorSpooler
public class SqlValidatorTest extends SqlValidatorTestCase
Concrete child class ofSqlValidatorTestCase
, containing lots of unit tests.If you want to run these same tests in a different environment, create a derived class whose
SqlValidatorTestCase.getTester()
returns a different implementation ofSqlTester
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.calcite.test.SqlValidatorTestCase
SqlValidatorTestCase.Sql, SqlValidatorTestCase.Tester
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
ANY
private static java.lang.String
EMP_RECORD_TYPE
private static java.lang.String
ERR_AGG_IN_GROUP_BY
private static java.lang.String
ERR_AGG_IN_ORDER_BY
private static java.lang.String
ERR_IN_OPERANDS_INCOMPATIBLE
private static java.lang.String
ERR_IN_VALUES_INCOMPATIBLE
private static java.lang.String
ERR_NESTED_AGG
protected static org.slf4j.Logger
LOGGER
private static java.lang.String
ROW_RANGE_NOT_ALLOWED_WITH_RANK
private static java.lang.String
STR_AGG_REQUIRES_MONO
private static java.lang.String
STR_ORDER_REQUIRES_MONO
private static java.lang.String
STR_SET_OP_INCONSISTENT
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.-
Fields inherited from class org.apache.calcite.test.SqlValidatorTestCase
EXTENDED_CATALOG_TESTER, EXTENDED_CATALOG_TESTER_2003, EXTENDED_CATALOG_TESTER_LENIENT, tester, TESTER_CONFIGURATION_RULE
-
-
Constructor Summary
Constructors Constructor Description SqlValidatorTest()
-
Method Summary
-
Methods inherited from class org.apache.calcite.test.SqlValidatorTestCase
assertExceptionIsThrown, check, checkCharset, checkCollation, checkColumnType, checkEx, checkExp, checkExpFails, checkExpType, checkFails, checkIntervalConv, checkResultType, checkWholeExpFails, expr, getTester, sql, win, winExp, winExp2, winSql
-
-
-
-
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
-
ANY
private static final java.lang.String ANY
- See Also:
- Constant Field Values
-
LOGGER
protected static final org.slf4j.Logger LOGGER
-
ERR_IN_VALUES_INCOMPATIBLE
private static final java.lang.String ERR_IN_VALUES_INCOMPATIBLE
- See Also:
- Constant Field Values
-
ERR_IN_OPERANDS_INCOMPATIBLE
private static final java.lang.String ERR_IN_OPERANDS_INCOMPATIBLE
- See Also:
- Constant Field Values
-
ERR_AGG_IN_GROUP_BY
private static final java.lang.String ERR_AGG_IN_GROUP_BY
- See Also:
- Constant Field Values
-
ERR_AGG_IN_ORDER_BY
private static final java.lang.String ERR_AGG_IN_ORDER_BY
- See Also:
- Constant Field Values
-
ERR_NESTED_AGG
private static final java.lang.String ERR_NESTED_AGG
- See Also:
- Constant Field Values
-
EMP_RECORD_TYPE
private static final java.lang.String EMP_RECORD_TYPE
- See Also:
- Constant Field Values
-
STR_AGG_REQUIRES_MONO
private static final java.lang.String STR_AGG_REQUIRES_MONO
- See Also:
- Constant Field Values
-
STR_ORDER_REQUIRES_MONO
private static final java.lang.String STR_ORDER_REQUIRES_MONO
- See Also:
- Constant Field Values
-
STR_SET_OP_INCONSISTENT
private static final java.lang.String STR_SET_OP_INCONSISTENT
- See Also:
- Constant Field Values
-
ROW_RANGE_NOT_ALLOWED_WITH_RANK
private static final java.lang.String ROW_RANGE_NOT_ALLOWED_WITH_RANK
- See Also:
- Constant Field Values
-
-
Method Detail
-
setUSLocale
public static void setUSLocale()
-
cannotConvertToStream
private static java.lang.String cannotConvertToStream(java.lang.String name)
-
cannotConvertToRelation
private static java.lang.String cannotConvertToRelation(java.lang.String table)
-
cannotStreamResultsForNonStreamingInputs
private static java.lang.String cannotStreamResultsForNonStreamingInputs(java.lang.String inputs)
-
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()
-
testTranslate3
public void testTranslate3()
-
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()
-
testCastRegisteredType
public void testCastRegisteredType()
-
testCastFails
public void testCastFails()
-
testCastBinaryLiteral
public void testCastBinaryLiteral()
-
testGeometry
public void testGeometry()
Tests whether the GEOMETRY data type is allowed.- See Also:
SqlConformance.allowGeometry()
-
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()
-
testRowWitValidDot
public void testRowWitValidDot()
-
testRowWithInvalidDotOperation
public void testRowWithInvalidDotOperation()
-
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.
-
testDatetimePlusNullInterval
public void testDatetimePlusNullInterval()
-
testIntervalLiterals
public void testIntervalLiterals()
-
testIntervalOperators
public void testIntervalOperators()
-
testTimestampAddAndDiff
public void testTimestampAddAndDiff()
-
testTimestampAddNullInterval
public void testTimestampAddNullInterval()
-
testNumericOperators
public void testNumericOperators()
-
testFloorCeil
public void testFloorCeil()
-
checkWinFuncExpWithWinClause
public void checkWinFuncExpWithWinClause(java.lang.String sql, java.lang.String expectedMsgPattern)
-
_testWinPartClause
public void _testWinPartClause()
-
testWindowFunctionsWithoutOver
public void testWindowFunctionsWithoutOver()
-
testOverInPartitionBy
public void testOverInPartitionBy()
-
testOverInOrderBy
public void testOverInOrderBy()
-
testAggregateFunctionInOver
public void testAggregateFunctionInOver()
-
testAggregateInsideOverClause
public void testAggregateInsideOverClause()
-
testAggregateInsideOverClause2
public void testAggregateInsideOverClause2()
-
testWindowFunctions
public void testWindowFunctions()
-
testWindowFunctions2
public void testWindowFunctions2()
-
testLeftOuterJoinWithAlias
public void testLeftOuterJoinWithAlias()
-
testInvalidWindowFunctionWithGroupBy
public void testInvalidWindowFunctionWithGroupBy()
-
testInlineWinDef
public void testInlineWinDef()
-
testPartitionByExpr
public void testPartitionByExpr()
-
testWindowClause
public void testWindowClause()
-
testWindowClause2
public void testWindowClause2()
-
testWindowClauseWithSubQuery
public void testWindowClauseWithSubQuery()
-
testPartitionByColumnInJoinAlias
public void testPartitionByColumnInJoinAlias()
-
testOrderByColumn
public void testOrderByColumn()
-
testWindowNegative
public void testWindowNegative()
-
checkNegWindow
private void checkNegWindow(java.lang.String s, java.lang.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()
-
testStarIdentifier
public void testStarIdentifier()
Test case for [CALCITE-546] Allow table, column and field called '*'.
-
testStarAliasFails
public void testStarAliasFails()
-
testNonLocalStar
public void testNonLocalStar()
-
testStarInFromFails
public void testStarInFromFails()
Parser allows "*" in FROM clause because "*" can occur in any identifier. But validator must not.- See Also:
testStarIdentifier()
-
testStarDotIdFails
public void testStarDotIdFails()
-
testAsColumnList
public void testAsColumnList()
-
testAmbiguousColumnInIn
public void testAmbiguousColumnInIn()
-
testInList
public void testInList()
-
testInSubQuery
public void testInSubQuery()
-
testAnyList
public void testAnyList()
-
testDoubleNoAlias
public void testDoubleNoAlias()
-
testDuplicateColumnAliasIsOK
public void testDuplicateColumnAliasIsOK()
-
testDuplicateTableAliasFails
public void testDuplicateTableAliasFails()
-
testSchemaTableStar
public void testSchemaTableStar()
-
testSchemaTableColumn
public void testSchemaTableColumn()
-
testSchemaTableColumnInGroupBy
public void testSchemaTableColumnInGroupBy()
-
testInvalidGroupBy
public void testInvalidGroupBy()
-
testInvalidGroupBy2
public void testInvalidGroupBy2()
-
testInvalidGroupBy3
public void testInvalidGroupBy3()
-
testCubeExpression
public void testCubeExpression()
Test case for [CALCITE-1781] Allow expression in CUBE and ROLLUP.
-
testRollupBitSets
public void testRollupBitSets()
Unit test forSqlValidatorUtil.rollup(java.util.List<org.apache.calcite.util.ImmutableBitSet>)
.
-
rollup
private com.google.common.collect.ImmutableList<org.apache.calcite.util.ImmutableBitSet> rollup(org.apache.calcite.util.ImmutableBitSet... sets)
-
testCubeBitSets
public void testCubeBitSets()
Unit test forSqlValidatorUtil.cube(java.util.List<org.apache.calcite.util.ImmutableBitSet>)
.
-
cube
private com.google.common.collect.ImmutableList<org.apache.calcite.util.ImmutableBitSet> cube(org.apache.calcite.util.ImmutableBitSet... sets)
-
testGrouping
public void testGrouping()
-
testGroupingId
public void testGroupingId()
-
testGroupId
public void testGroupId()
-
testCubeGrouping
public void testCubeGrouping()
-
testSumInvalidArgs
public void testSumInvalidArgs()
-
testSumTooManyArgs
public void testSumTooManyArgs()
-
testSumTooFewArgs
public void testSumTooFewArgs()
-
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()
-
testNaturalJoinCaseSensitive
public void testNaturalJoinCaseSensitive()
-
testNaturalJoinIncompatibleDatatype
public void testNaturalJoinIncompatibleDatatype()
-
testJoinUsingIncompatibleDatatype
public void testJoinUsingIncompatibleDatatype()
-
testJoinUsingInvalidColsFails
public void testJoinUsingInvalidColsFails()
-
testJoinUsingDupColsFails
public void testJoinUsingDupColsFails()
-
testJoinRowType
public void testJoinRowType()
-
_testJoinUsing
public void _testJoinUsing()
-
testJoinSubQuery
public void testJoinSubQuery()
-
testJoinOnIn
public void testJoinOnIn()
-
testJoinOnInCorrelated
public void testJoinOnInCorrelated()
-
testJoinOnInCorrelatedFails
public void testJoinOnInCorrelatedFails()
-
testJoinOnExistsCorrelated
public void testJoinOnExistsCorrelated()
-
testJoinOnScalarCorrelated
public void testJoinOnScalarCorrelated()
-
testJoinOnScalarFails
public void testJoinOnScalarFails()
-
testJoinUsingThreeWay
public void testJoinUsingThreeWay()
-
testWhere
public void testWhere()
-
testOn
public void testOn()
-
testHaving
public void testHaving()
-
testHavingBetween
public void testHavingBetween()
-
testWith
public void testWith()
Tests theWITH
clause, also called common table expressions.
-
testWithUnion
public void testWithUnion()
Tests theWITH
clause with UNION.
-
testWithColumnAlias
public void testWithColumnAlias()
Tests theWITH
clause and column aliases.
-
testWithSubQuery
public void testWithSubQuery()
Tests theWITH
clause in sub-queries.
-
testWithOrderAgg
public void testWithOrderAgg()
-
testLarge
public void testLarge()
Tests a large scalar expression, which will expose any O(n^2) algorithms lurking in the validation process.
-
checkLarge
static void checkLarge(int x, java.util.function.Consumer<java.lang.String> f)
-
list
private static java.lang.String list(java.lang.String sep, java.lang.String before, int count)
-
testAbstractConformance
public void testAbstractConformance() throws java.lang.reflect.InvocationTargetException, java.lang.IllegalAccessException
- Throws:
java.lang.reflect.InvocationTargetException
java.lang.IllegalAccessException
-
testUserDefinedConformance
public void testUserDefinedConformance()
-
testOrder
public void testOrder()
-
testOrderJoin
public void testOrderJoin()
-
testWithOrder
public void testWithOrder()
Test case for [CALCITE-633] WITH ... ORDER BY cannot find table.
-
testWithOrderInParentheses
public void testWithOrderInParentheses()
-
testOrderUnion
public void testOrderUnion()
-
testOrderGroup
public void testOrderGroup()
Tests validation of the ORDER BY clause when GROUP BY is present.
-
testAliasInGroupBy
public void testAliasInGroupBy()
Tests validation of the aliases in GROUP BY.Test case for [CALCITE-1306] Allow GROUP BY and HAVING to reference SELECT expressions by ordinal and alias.
- See Also:
SqlConformance.isGroupByAlias()
-
testOrdinalInGroupBy
public void testOrdinalInGroupBy()
Tests validation of ordinals in GROUP BY.- See Also:
SqlConformance.isGroupByOrdinal()
-
testAliasInHaving
public void testAliasInHaving()
Tests validation of the aliases in HAVING.- See Also:
SqlConformance.isHavingAlias()
-
testOrderDistinct
public void testOrderDistinct()
Tests validation of the ORDER BY clause when DISTINCT is present.
-
testOrderGroupDistinct
public void testOrderGroupDistinct()
Tests validation of the ORDER BY clause when DISTINCT and GROUP BY are present.Test case for [CALCITE-634] Allow ORDER BY aggregate function in SELECT DISTINCT, provided that it occurs in SELECT clause.
-
testGroup
public void testGroup()
-
testGroupBySystemFunction
public void testGroupBySystemFunction()
Test case for [CALCITE-886] System functions in GROUP BY clause.
-
testGroupingSets
public void testGroupingSets()
-
testRollup
public void testRollup()
-
testGroupByCorrelatedColumn
public void testGroupByCorrelatedColumn()
-
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()
-
testNestedAggOver
public void testNestedAggOver()
-
testAggregateInGroupByFails
public void testAggregateInGroupByFails()
-
testAggregateInNonGroupBy
public void testAggregateInNonGroupBy()
-
testAggregateInOrderByFails
public void testAggregateInOrderByFails()
-
testAggregateFilter
public void testAggregateFilter()
-
testAggregateFilterNotBoolean
public void testAggregateFilterNotBoolean()
-
testAggregateFilterInHaving
public void testAggregateFilterInHaving()
-
testAggregateFilterContainsAggregate
public void testAggregateFilterContainsAggregate()
-
testWithinGroup
public void testWithinGroup()
-
testCorrelatingVariables
public void testCorrelatingVariables()
-
testIntervalCompare
public void testIntervalCompare()
-
testDateCompare
public void testDateCompare()
Test case for [CALCITE-613] Implicitly convert strings in comparisons.
-
testOverlaps
public void testOverlaps()
-
testContains
public void testContains()
-
testExtract
public void testExtract()
-
testCastToInterval
public void testCastToInterval()
-
testMinusDateOperator
public void testMinusDateOperator()
-
testBind
public void testBind()
-
testBindBetween
public void testBindBetween()
Test case for [CALCITE-1310] Infer type of arguments to BETWEEN operator.
-
testUnnest
public void testUnnest()
-
testUnnestArray
public void testUnnestArray()
-
testArrayConstructor
public void testArrayConstructor()
-
testMultisetConstructor
public void testMultisetConstructor()
-
testUnnestArrayColumn
public void testUnnestArrayColumn()
-
testUnnestWithOrdinality
public void testUnnestWithOrdinality()
-
unnestMapMustNameColumnsKeyAndValueWhenNotAliased
public void unnestMapMustNameColumnsKeyAndValueWhenNotAliased()
-
testCorrelationJoin
public void testCorrelationJoin()
-
testStructuredTypes
public void testStructuredTypes()
-
testLateral
public void testLateral()
-
testCollect
public void testCollect()
-
testFusion
public void testFusion()
-
testCountFunction
public void testCountFunction()
-
testCountCompositeFunction
public void testCountCompositeFunction()
-
testLastFunction
public void testLastFunction()
-
testMinMaxFunctions
public void testMinMaxFunctions()
-
testAnyValueFunction
public void testAnyValueFunction()
-
testFunctionalDistinct
public void testFunctionalDistinct()
-
testColumnNotFound
public void testColumnNotFound()
-
testColumnNotFound2
public void testColumnNotFound2()
-
testColumnNotFound3
public void testColumnNotFound3()
-
testSelectDistinct
public void testSelectDistinct()
-
testSelectWithoutFrom
public void testSelectWithoutFrom()
-
testTableExtend
public void testTableExtend()
-
testExplicitTable
public void testExplicitTable()
-
testCollectionTable
public void testCollectionTable()
-
testCollectionTableWithLateral
public void testCollectionTableWithLateral()
Test case for [CALCITE-1309] Support LATERAL TABLE.
-
testCollectionTableWithLateral2
public void testCollectionTableWithLateral2()
-
testCollectionTableWithCursorParam
public void testCollectionTableWithCursorParam()
-
testScalarSubQuery
public void testScalarSubQuery()
-
testSubQueryInOnClause
public void testSubQueryInOnClause()
-
testRecordType
public void testRecordType()
-
testArrayOfRecordType
public void testArrayOfRecordType()
-
testRecordTypeElided
public void testRecordTypeElided()
-
testSample
public void testSample()
-
testRewriteWithoutIdentifierExpansion
public void testRewriteWithoutIdentifierExpansion()
-
testRewriteWithLimitWithoutOrderBy
public void testRewriteWithLimitWithoutOrderBy()
-
testRewriteWithLimitWithDynamicParameters
public void testRewriteWithLimitWithDynamicParameters()
-
testRewriteWithOffsetWithoutOrderBy
public void testRewriteWithOffsetWithoutOrderBy()
-
testRewriteWithUnionFetchWithoutOrderBy
public void testRewriteWithUnionFetchWithoutOrderBy()
-
testRewriteWithIdentifierExpansion
public void testRewriteWithIdentifierExpansion()
-
testRewriteWithColumnReferenceExpansion
public void testRewriteWithColumnReferenceExpansion()
-
testRewriteWithColumnReferenceExpansionAndFromAlias
public void testRewriteWithColumnReferenceExpansionAndFromAlias()
-
testCoalesceWithoutRewrite
public void testCoalesceWithoutRewrite()
-
testCoalesceWithRewrite
public void testCoalesceWithRewrite()
-
_testValuesWithAggFuncs
public void _testValuesWithAggFuncs()
-
testFieldOrigin
public void testFieldOrigin()
-
testBrackets
public void testBrackets()
-
testLexJava
public void testLexJava()
-
testLexJavaKeyword
public void testLexJavaKeyword()
-
testLexAndQuoting
public void testLexAndQuoting()
-
testCaseInsensitive
public void testCaseInsensitive()
Tests using case-insensitive matching of identifiers.
-
testCaseInsensitiveTableAlias
public void testCaseInsensitiveTableAlias()
-
testCaseInsensitiveTableAliasInGroupBy
public void testCaseInsensitiveTableAliasInGroupBy()
Test case for [CALCITE-1305] Case-insensitive table aliases and GROUP BY.
-
testTableNotFoundDidYouMean
public void testTableNotFoundDidYouMean()
-
testColumnNotFoundDidYouMean
public void testColumnNotFoundDidYouMean()
-
testUnquotedBuiltInFunctionNames
public void testUnquotedBuiltInFunctionNames()
Tests matching of built-in operator names.
-
testStandardOperatorNamesAreUpperCase
public void testStandardOperatorNamesAreUpperCase()
Sanity check: All built-ins are upper-case. We rely on this.
-
prec
private static int prec(org.apache.calcite.sql.SqlOperator op)
-
testOperatorsSortedByPrecedence
public void testOperatorsSortedByPrecedence()
Tests that operators, sorted by precedence, are in a sane order. Each operator has aleft
andSqlOperator.getRightPrec()
right} precedence, but we would like the order to remain the same even if we tweak particular operators' precedences. If you need to update the expected output, you might also need to change the documentation.
-
testCaseInsensitiveInsert
public void testCaseInsensitiveInsert()
Tests that it is an error to insert into the same column twice, even using case-insensitive matching.
-
testCaseInsensitiveSubQuery
public void testCaseInsensitiveSubQuery()
Tests referencing columns from a sub-query that has duplicate column names. (The standard says it should be an error, but we don't right now.)
-
testCaseInsensitiveTables
public void testCaseInsensitiveTables()
Tests using case-insensitive matching of table names.
-
testInsert
public void testInsert()
-
testInsertSubset
public void testInsertSubset()
-
testInsertShouldNotCheckForDefaultValue
public void testInsertShouldNotCheckForDefaultValue()
Test case for [CALCITE-1510] INSERT/UPSERT should allow fewer values than columns, check for default value only when target field is null.
-
testInsertView
public void testInsertView()
-
testInsertSubsetView
public void testInsertSubsetView()
-
testInsertModifiableView
public void testInsertModifiableView()
-
testInsertSubsetModifiableView
public void testInsertSubsetModifiableView()
-
testInsertBind
public void testInsertBind()
-
testInsertWithExtendedColumns
public void testInsertWithExtendedColumns()
-
testInsertBindSubset
public void testInsertBindSubset()
-
testInsertBindView
public void testInsertBindView()
-
testInsertModifiableViewPassConstraint
public void testInsertModifiableViewPassConstraint()
-
testInsertModifiableViewFailConstraint
public void testInsertModifiableViewFailConstraint()
-
testUpdateModifiableViewPassConstraint
public void testUpdateModifiableViewPassConstraint()
-
testUpdateModifiableViewFailConstraint
public void testUpdateModifiableViewFailConstraint()
-
testInsertFailNullability
public void testInsertFailNullability()
-
testInsertSubsetFailNullability
public void testInsertSubsetFailNullability()
-
testInsertViewFailNullability
public void testInsertViewFailNullability()
-
testInsertSubsetViewFailNullability
public void testInsertSubsetViewFailNullability()
-
testInsertBindFailNullability
public void testInsertBindFailNullability()
-
testInsertBindSubsetFailNullability
public void testInsertBindSubsetFailNullability()
-
testInsertSubsetDisallowed
public void testInsertSubsetDisallowed()
-
testInsertSubsetViewDisallowed
public void testInsertSubsetViewDisallowed()
-
testInsertBindSubsetDisallowed
public void testInsertBindSubsetDisallowed()
-
testSelectExtendedColumnDuplicate
public void testSelectExtendedColumnDuplicate()
-
testSelectViewFailExcludedColumn
public void testSelectViewFailExcludedColumn()
-
testSelectViewExtendedColumnCollision
public void testSelectViewExtendedColumnCollision()
-
testSelectViewExtendedColumnExtendedCollision
public void testSelectViewExtendedColumnExtendedCollision()
-
testSelectViewExtendedColumnUnderlyingCollision
public void testSelectViewExtendedColumnUnderlyingCollision()
-
testSelectExtendedColumnCollision
public void testSelectExtendedColumnCollision()
-
testSelectExtendedColumnFailCollision
public void testSelectExtendedColumnFailCollision()
-
testSelectViewExtendedColumnFailCollision
public void testSelectViewExtendedColumnFailCollision()
-
testSelectViewExtendedColumnFailExtendedCollision
public void testSelectViewExtendedColumnFailExtendedCollision()
-
testSelectViewExtendedColumnFailUnderlyingCollision
public void testSelectViewExtendedColumnFailUnderlyingCollision()
-
testSelectFailCaseSensitivity
public void testSelectFailCaseSensitivity()
-
testInsertFailCaseSensitivity
public void testInsertFailCaseSensitivity()
-
testInsertFailExcludedColumn
public void testInsertFailExcludedColumn()
-
testInsertBindViewFailExcludedColumn
public void testInsertBindViewFailExcludedColumn()
-
testInsertWithCustomInitializerExpressionFactory
public void testInsertWithCustomInitializerExpressionFactory()
-
testInsertSubsetWithCustomInitializerExpressionFactory
public void testInsertSubsetWithCustomInitializerExpressionFactory()
-
testInsertBindWithCustomInitializerExpressionFactory
public void testInsertBindWithCustomInitializerExpressionFactory()
-
testInsertBindSubsetWithCustomInitializerExpressionFactory
public void testInsertBindSubsetWithCustomInitializerExpressionFactory()
-
testInsertBindWithCustomColumnResolving
public void testInsertBindWithCustomColumnResolving()
-
testUpdateBind
public void testUpdateBind()
-
testDeleteBind
public void testDeleteBind()
-
testStream
public void testStream()
-
testStreamWhere
public void testStreamWhere()
-
testStreamGroupBy
public void testStreamGroupBy()
-
testStreamHaving
public void testStreamHaving()
-
testMonotonic
public void testMonotonic()
Tests that various expressions are monotonic.
-
testStreamUnionAll
public void testStreamUnionAll()
-
testStreamValues
public void testStreamValues()
-
testStreamOrderBy
public void testStreamOrderBy()
-
testStreamJoin
public void testStreamJoin()
-
testDummy
public void testDummy()
-
testCustomColumnResolving
public void testCustomColumnResolving()
-
testCustomColumnResolvingWithView
public void testCustomColumnResolvingWithView()
-
checkCustomColumnResolving
private void checkCustomColumnResolving(java.lang.String table)
-
testStreamTumble
public void testStreamTumble()
-
testStreamHop
public void testStreamHop()
-
testStreamSession
public void testStreamSession()
-
testInsertExtendedColumn
public void testInsertExtendedColumn()
-
testInsertBindExtendedColumn
public void testInsertBindExtendedColumn()
-
testInsertExtendedColumnModifiableView
public void testInsertExtendedColumnModifiableView()
-
testInsertBindExtendedColumnModifiableView
public void testInsertBindExtendedColumnModifiableView()
-
testInsertExtendedColumnModifiableViewFailConstraint
public void testInsertExtendedColumnModifiableViewFailConstraint()
-
testInsertExtendedColumnModifiableViewFailColumnCount
public void testInsertExtendedColumnModifiableViewFailColumnCount()
-
testInsertExtendedColumnFailDuplicate
public void testInsertExtendedColumnFailDuplicate()
-
testUpdateExtendedColumn
public void testUpdateExtendedColumn()
-
testInsertFailDataType
public void testInsertFailDataType()
-
testUpdateFailDataType
public void testUpdateFailDataType()
-
testUpdateFailCaseSensitivity
public void testUpdateFailCaseSensitivity()
-
testUpdateExtendedColumnFailCaseSensitivity
public void testUpdateExtendedColumnFailCaseSensitivity()
-
testUpdateBindExtendedColumn
public void testUpdateBindExtendedColumn()
-
testUpdateExtendedColumnModifiableView
public void testUpdateExtendedColumnModifiableView()
-
testUpdateBindExtendedColumnModifiableView
public void testUpdateBindExtendedColumnModifiableView()
-
testUpdateExtendedColumnModifiableViewFailConstraint
public void testUpdateExtendedColumnModifiableViewFailConstraint()
-
testUpdateExtendedColumnCollision
public void testUpdateExtendedColumnCollision()
-
testUpdateExtendedColumnModifiableViewCollision
public void testUpdateExtendedColumnModifiableViewCollision()
-
testUpdateExtendedColumnFailCollision
public void testUpdateExtendedColumnFailCollision()
-
testUpdateExtendedColumnFailCollision2
public void testUpdateExtendedColumnFailCollision2()
-
testUpdateExtendedColumnModifiableViewFailCollision
public void testUpdateExtendedColumnModifiableViewFailCollision()
-
testUpdateExtendedColumnModifiableViewFailExtendedCollision
public void testUpdateExtendedColumnModifiableViewFailExtendedCollision()
-
testUpdateExtendedColumnModifiableViewFailUnderlyingCollision
public void testUpdateExtendedColumnModifiableViewFailUnderlyingCollision()
-
testUpdateExtendedColumnFailDuplicate
public void testUpdateExtendedColumnFailDuplicate()
-
testInsertExtendedColumnCollision
public void testInsertExtendedColumnCollision()
-
testInsertExtendedColumnModifiableViewCollision
public void testInsertExtendedColumnModifiableViewCollision()
-
testInsertExtendedColumnModifiableViewExtendedCollision
public void testInsertExtendedColumnModifiableViewExtendedCollision()
-
testInsertExtendedColumnModifiableViewUnderlyingCollision
public void testInsertExtendedColumnModifiableViewUnderlyingCollision()
-
testInsertExtendedColumnFailCollision
public void testInsertExtendedColumnFailCollision()
-
testInsertExtendedColumnModifiableViewFailCollision
public void testInsertExtendedColumnModifiableViewFailCollision()
-
testInsertExtendedColumnModifiableViewFailExtendedCollision
public void testInsertExtendedColumnModifiableViewFailExtendedCollision()
-
testInsertExtendedColumnModifiableViewFailUnderlyingCollision
public void testInsertExtendedColumnModifiableViewFailUnderlyingCollision()
-
testDelete
public void testDelete()
-
testDeleteExtendedColumn
public void testDeleteExtendedColumn()
-
testDeleteBindExtendedColumn
public void testDeleteBindExtendedColumn()
-
testDeleteModifiableView
public void testDeleteModifiableView()
-
testDeleteExtendedColumnModifiableView
public void testDeleteExtendedColumnModifiableView()
-
testDeleteExtendedColumnCollision
public void testDeleteExtendedColumnCollision()
-
testDeleteExtendedColumnModifiableViewCollision
public void testDeleteExtendedColumnModifiableViewCollision()
-
testDeleteExtendedColumnFailCollision
public void testDeleteExtendedColumnFailCollision()
-
testDeleteExtendedColumnModifiableViewFailCollision
public void testDeleteExtendedColumnModifiableViewFailCollision()
-
testDeleteExtendedColumnModifiableViewFailExtendedCollision
public void testDeleteExtendedColumnModifiableViewFailExtendedCollision()
-
testDeleteExtendedColumnFailDuplicate
public void testDeleteExtendedColumnFailDuplicate()
-
testArrayAssignment
public void testArrayAssignment()
-
testSelectRolledUpColumn
public void testSelectRolledUpColumn()
-
testSelectAggregateOnRolledUpColumn
public void testSelectAggregateOnRolledUpColumn()
-
testRolledUpColumnInWhere
public void testRolledUpColumnInWhere()
-
testRolledUpColumnInHaving
public void testRolledUpColumnInHaving()
-
testRollUpInWindow
public void testRollUpInWindow()
-
testRollUpInGroupBy
public void testRollUpInGroupBy()
-
testRollUpInOrderBy
public void testRollUpInOrderBy()
-
testRollUpInJoin
public void testRollUpInJoin()
-
testJsonExists
public void testJsonExists()
-
testJsonValue
public void testJsonValue()
-
testJsonQuery
public void testJsonQuery()
-
testJsonArray
public void testJsonArray()
-
testJsonArrayAgg
public void testJsonArrayAgg()
-
testJsonObject
public void testJsonObject()
-
testJsonObjectAgg
public void testJsonObjectAgg()
-
testJsonPredicate
public void testJsonPredicate()
-
testValidatorReportsOriginalQueryUsingReader
public void testValidatorReportsOriginalQueryUsingReader() throws java.lang.Exception
- Throws:
java.lang.Exception
-
-