Package org.apache.calcite.test
Class ServerParserTest
- java.lang.Object
-
- org.apache.calcite.sql.parser.SqlParserTest
-
- org.apache.calcite.test.ServerParserTest
-
- Direct Known Subclasses:
ServerUnParserTest
public class ServerParserTest extends SqlParserTest
Tests SQL parser extensions for DDL.Remaining tasks:
- "create table x (a int) as values 1, 2" should fail validation; data type not allowed in "create table ... as".
- "create table x (a int, b int as (a + 1)) stored" should not allow b to be specified in insert; should generate check constraint on b; should populate b in insert as if it had a default
- "create table as select" should store constraints deduced by planner
- during CREATE VIEW, check for a table and a materialized view with the same name (they have the same namespace)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.calcite.sql.parser.SqlParserTest
SqlParserTest.Sql, SqlParserTest.Tester, SqlParserTest.TesterImpl, SqlParserTest.UnparsingTesterImpl
-
-
Constructor Summary
Constructors Constructor Description ServerParserTest()
-
Method Summary
-
Methods inherited from class org.apache.calcite.sql.parser.SqlParserTest
check, checkExp, checkExpFails, checkExpSame, checkFails, getReservedKeywords, getSqlParser, getSqlParser, getTester, isDdl, isReserved, isUnparserTest, keywords, sql, subTestIntervalDayFailsValidation, subTestIntervalDayPositive, subTestIntervalDayToHourFailsValidation, subTestIntervalDayToHourPositive, subTestIntervalDayToMinuteFailsValidation, subTestIntervalDayToMinutePositive, subTestIntervalDayToSecondFailsValidation, subTestIntervalDayToSecondPositive, subTestIntervalHourFailsValidation, subTestIntervalHourPositive, subTestIntervalHourToMinuteFailsValidation, subTestIntervalHourToMinutePositive, subTestIntervalHourToSecondFailsValidation, subTestIntervalHourToSecondPositive, subTestIntervalMinuteFailsValidation, subTestIntervalMinutePositive, subTestIntervalMinuteToSecondFailsValidation, subTestIntervalMinuteToSecondPositive, subTestIntervalMonthFailsValidation, subTestIntervalMonthPositive, subTestIntervalSecondFailsValidation, subTestIntervalSecondPositive, subTestIntervalYearFailsValidation, subTestIntervalYearPositive, subTestIntervalYearToMonthFailsValidation, subTestIntervalYearToMonthPositive, testAddCarets, testAggregateFilter, testAliasedStar, testAll, testAllList, testApply, testArithmeticOperators, testArrayElement, testArrayElementWithDot, testArrayValueConstructor, testAs, testAsAliases, testBackTickIdentifier, testBackTickQuery, testBangEqualIsBad, testBetween, testBetweenAnd, testBetweenAnd2, testBitStringNotImplemented, testBooleanPrecedenceAndAssociativity, testBracketIdentifier, testCardinalityFunc, testCaseExpression, testCaseExpressionFails, testCast, testCastFails, testCastToInterval, testCastToVarchar, testCatalogSchemaTableStar, testCeil, testCharLength, testCoalesce, testCollectionTable, testCollectionTableWithColumnListParam, testCollectionTableWithCursorParam, testCollectionTableWithLateral, testCollectionTableWithLateral2, testCollectionTableWithLateral3, testColumnAliasWithAs, testColumnAliasWithoutAs, testCompoundStar, testConcat, testContinuedLiteral, testConvertAndTranslate, testCrossOuterApply, testDateLiteral, testDateMinusDate, testDateTimeCast, testDefault, testDelete, testDeleteWhere, testDerivedColumnList, testDerivedColumnListInJoin, testDerivedColumnListNoAs, testDescribeSchema, testDescribeStatement, testDescribeTable, testElementFunc, testEmbeddedCall, testEmbeddedDate, testEmbeddedFunction, testEmbeddedTime, testEmbeddedTimestamp, testEmptyValues, testEqualNotEqual, testExcept, testExceptionCleanup, testExists, testExistsInWhere, testExplain, testExplainAsJson, testExplainAsXml, testExplainInsert, testExplainUpsert, testExplainWithImpl, testExplainWithoutImpl, testExplainWithType, testExplicitTable, testExplicitTableInJoin, testExplicitTableOrdered, testExtract, testFloor, testFoo, testFromValues, testFromValuesWithoutParens, testFromWithAs, testFullInnerJoinFails, testFullOuterJoin, testFunction, testFunctionCallWithDot, testFunctionDefaultArgument, testFunctionInFunction, testFunctionNamedArgument, testFunctionWithDistinct, testGeometry, testGroup, testGroupByCube, testGroupByCube2, testGroupByRollup, testGroupEmpty, testGrouping, testGroupingSets, testHavingAfterGroup, testHavingBeforeGroupFails, testHavingNoGroup, testHexAndBinaryString, testHexAndBinaryStringFails, testIdentifier, testIllegalCursors, testIllegalUnicodeEscape, testInList, testInListEmptyFails, testInnerOuterJoinFails, testInQuery, testInQueryWithComma, testInsertCaseSensitiveColumnList, testInsertCaseSensitiveExtendedColumnList, testInsertColumnList, testInsertExtendedColumnList, testInsertSelect, testInsertUnion, testInsertValues, testInsertValuesDefault, testInsertValuesRawDefault, testInSetop, testIntersect, testIntervalArithmetics, testIntervalCompare, testIntervalLiterals, testIntervalOperators, testInvalidToken, testIsASet, testIsBooleanPrecedenceAndAssociativity, testIsBooleans, testIsDistinctFrom, testIsNotDistinct, testJdbcFunctionCall, testJoinAssociativity, testJoinCross, testJoinOn, testJoinOnParentheses, testJoinOnParenthesesPlus, testJoinQuery, testJoinUsing, testJsonArray, testJsonArrayAgg, testJsonExists, testJsonObject, testJsonObjectAgg, testJsonPredicate, testJsonQuery, testJsonValue, testLateral, testLessThanAssociativity, testLikeAndSimilar, testLimit, testLimitOffsetWithoutOrder, testLimitStartCount, testLimitUnion, testLimitWithoutOrder, testLiteral, testLiteralCollate, testLongIdentifiers, testMapItem, testMapItemPrecedence, testMapValueConstructor, testMatchRecognize1, testMatchRecognize10, testMatchRecognize11, testMatchRecognize2, testMatchRecognize3, testMatchRecognize4, testMatchRecognize5, testMatchRecognize6, testMatchRecognize7, testMatchRecognize8, testMatchRecognize9, testMatchRecognizeDefineClause, testMatchRecognizeDefineClause2, testMatchRecognizeDefineClause3, testMatchRecognizeDefineClause4, testMatchRecognizeMeasures1, testMatchRecognizeMeasures2, testMatchRecognizeMeasures3, testMatchRecognizeMeasures4, testMatchRecognizeMeasures5, testMatchRecognizeMeasures6, testMatchRecognizePatternSkip1, testMatchRecognizePatternSkip2, testMatchRecognizePatternSkip3, testMatchRecognizePatternSkip4, testMatchRecognizePatternSkip5, testMatchRecognizeRowsPerMatch1, testMatchRecognizeRowsPerMatch2, testMatchRecognizeSubset1, testMatchRecognizeSubset2, testMatchRecognizeSubset3, testMatchRecognizeWithin, testMemberOf, testMergeSelectSource, testMergeTableRefSource, testMetadata, testMinusIsReserved, testMinusPrefixInExpression, testMiscIntervalQualifier, testMixedFrom, testMixedStar, testMultilineComment, testMultiset, testMultisetCast, testMultisetExcept, testMultisetIntersect, testMultisetMixed, testMultisetUnion, testNaturalCrossJoin, testNestedSelect, testNewSpecification, testNot, testNotExists, testNoUnintendedNewReservedKeywords, testNullIf, testOperateOnColumn, testOrder, testOrderIllegalInExpression, testOrderInternal, testOrderNullsFirst, testOrderOffsetFetch, testOrderUnion, testOuterApply, testOuterApplyFunctionFails, testOuterApplySubQuery, testOuterApplyValues, testOuterJoinNoiseWord, testOver, testOverlaps, testOverlay, testParensInFrom, testParseNumber, testParseNumberFails, testParseWithReader, testPeriod, testPosition, testPrecedence0, testPrecedence1, testPrecedence2, testPrecedence2b, testPrecedence3, testPrecedence4, testPrecedence5, testPrecedenceSetOps, testProcedureCall, testQueryInFrom, testQueryInIllegalContext, testQuotedFunction, testQuotesInString, testReplace, testReverseSolidus, testRow, testRowWitDot, testScalarQueryInSelect, testScalarQueryInWhere, testSchemaTableStar, testSelectAll, testSelectDistinct, testSelectDistinctWithoutFrom, testSelectFromBareExplicitTableFails, testSelectFromExplicitTable, testSelectIsNotDdl, testSelectList, testSelectList3, testSelectList4, testSelectStream, testSelectStreamDistinct, testSelectWithoutFrom, testSelectWithoutFrom2, testSelectWithoutFromGroupByFails, testSelectWithoutFromHavingFails, testSelectWithoutFromWhereFails, testSequence, testSetMinus, testSome, testSqlInlineComment, testSqlOptions, testStar, testStarAsFails, testStringLiteral, testStringLiteralChain, testStringLiteralFails, testSubMultisetrOf, testSubQueryInJoin, testSubstring, testTableExtend, testTableSample, testTabStop, testTimeDate, testTimestampAdd, testTimestampAddAndDiff, testTimestampDiff, testTranslate3, testTrim, testUnicodeEscapedLiteral, testUnicodeLiteral, testUnion, testUnionOfNonQueryFails, testUnionOrder, testUnnest, testUnnestWithOrdinality, testUnparseableIntervalQualifiers, testUpdate, testUpdateCaseSensitiveExtendedColumnList, testUpdateExtendedColumnList, testUpsertSelect, testUpsertValues, testValues, testValuesExplicitRow, testWhere, testWindowInSubQuery, testWindowReference, testWindowSpec, testWindowSpecPartial, testWith, testWith2, testWithFails, testWithinGroupClause1, testWithinGroupClause2, testWithinGroupClause3, testWithinGroupClause4, testWithinGroupClause5, testWithNestedFails, testWithNestedInSubQuery, testWithUnion, testWithValues
-
-
-
-
Method Detail
-
parserImplFactory
protected org.apache.calcite.sql.parser.SqlParserImplFactory parserImplFactory()
Description copied from class:SqlParserTest
Implementors of custom parsing logic who want to reuse this test should override this method with the factory for their extension parser.- Overrides:
parserImplFactory
in classSqlParserTest
-
testGenerateKeyWords
public void testGenerateKeyWords()
Description copied from class:SqlParserTest
Generates a copy ofreference.md
with the current set of key words. Fails if the copy is different from the original.- Overrides:
testGenerateKeyWords
in classSqlParserTest
-
testCreateSchema
public void testCreateSchema()
-
testCreateOrReplaceSchema
public void testCreateOrReplaceSchema()
-
testCreateForeignSchema
public void testCreateForeignSchema()
-
testCreateForeignSchema2
public void testCreateForeignSchema2()
-
testCreateTypeWithAttributeList
public void testCreateTypeWithAttributeList()
-
testCreateTypeWithBaseType
public void testCreateTypeWithBaseType()
-
testCreateOrReplaceTypeWith
public void testCreateOrReplaceTypeWith()
-
testCreateTable
public void testCreateTable()
-
testCreateTableAsSelect
public void testCreateTableAsSelect()
-
testCreateTableIfNotExistsAsSelect
public void testCreateTableIfNotExistsAsSelect()
-
testCreateTableAsValues
public void testCreateTableAsValues()
-
testCreateTableAsSelectColumnList
public void testCreateTableAsSelectColumnList()
-
testCreateTableCheck
public void testCreateTableCheck()
-
testCreateTableVirtualColumn
public void testCreateTableVirtualColumn()
-
testCreateView
public void testCreateView()
-
testCreateMaterializedView
public void testCreateMaterializedView()
-
testCreateMaterializedView2
public void testCreateMaterializedView2()
-
testCreateOrReplaceMaterializedView
public void testCreateOrReplaceMaterializedView()
-
testCreateOrReplaceFunction
public void testCreateOrReplaceFunction()
-
testCreateOrReplaceFunction2
public void testCreateOrReplaceFunction2()
-
testDropSchema
public void testDropSchema()
-
testDropSchemaIfExists
public void testDropSchemaIfExists()
-
testDropForeignSchema
public void testDropForeignSchema()
-
testDropType
public void testDropType()
-
testDropTypeIfExists
public void testDropTypeIfExists()
-
testDropTypeTrailingIfExistsFails
public void testDropTypeTrailingIfExistsFails()
-
testDropTable
public void testDropTable()
-
testDropTableComposite
public void testDropTableComposite()
-
testDropTableIfExists
public void testDropTableIfExists()
-
testDropView
public void testDropView()
-
testDropMaterializedView
public void testDropMaterializedView()
-
testDropMaterializedViewIfExists
public void testDropMaterializedViewIfExists()
-
testDropFunction
public void testDropFunction()
-
testDropFunctionIfExists
public void testDropFunctionIfExists()
-
-