Package org.apache.flink.sql.parser.ddl
Class SqlAlterTableAddConstraint
java.lang.Object
org.apache.calcite.sql.SqlNode
org.apache.calcite.sql.SqlCall
org.apache.flink.sql.parser.ddl.SqlAlterTable
org.apache.flink.sql.parser.ddl.SqlAlterTableAddConstraint
- All Implemented Interfaces:
Cloneable
ALTER TABLE [IF EXISTS] [catalog_name.][db_name.]table_name ADD [CONSTRAINT constraint_name]
(PRIMARY KEY | UNIQUE) (column, ...) [[NOT] ENFORCED].
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.flink.sql.parser.ddl.SqlAlterTable
SqlAlterTable.AlterTableContext -
Field Summary
Fields inherited from class org.apache.flink.sql.parser.ddl.SqlAlterTable
ifTableExists, OPERATOR, partitionSpec, tableIdentifierFields inherited from class org.apache.calcite.sql.SqlNode
EMPTY_ARRAY, pos -
Constructor Summary
ConstructorsConstructorDescriptionSqlAlterTableAddConstraint(org.apache.calcite.sql.SqlIdentifier tableID, SqlTableConstraint constraint, org.apache.calcite.sql.parser.SqlParserPos pos, boolean ifTableExists) Creates a add table constraint node. -
Method Summary
Methods inherited from class org.apache.flink.sql.parser.ddl.SqlAlterTable
fullTableName, getOperator, getPartitionKVs, getPartitionSpec, getTableName, ifTableExistsMethods inherited from class org.apache.calcite.sql.SqlCall
accept, clone, equalsDeep, findValidOptions, getCallSignature, getFunctionQuantifier, getKind, getMonotonicity, isCountStar, isExpanded, operand, operandCount, setOperand, validateMethods inherited from class org.apache.calcite.sql.SqlNode
clone, clone, cloneArray, equalDeep, equalDeep, equalsDeep, getParserPosition, isA, toList, toList, toSqlString, toSqlString, toSqlString, toString, unparseWithParentheses, validateExpr
-
Constructor Details
-
SqlAlterTableAddConstraint
public SqlAlterTableAddConstraint(org.apache.calcite.sql.SqlIdentifier tableID, SqlTableConstraint constraint, org.apache.calcite.sql.parser.SqlParserPos pos, boolean ifTableExists) Creates a add table constraint node.- Parameters:
tableID- Table IDconstraint- Table constraintpos- Parser positionifTableExists- Whether IF EXISTS is specified
-
-
Method Details
-
getConstraint
-
getOperandList
- Specified by:
getOperandListin classorg.apache.calcite.sql.SqlCall
-
unparse
public void unparse(org.apache.calcite.sql.SqlWriter writer, int leftPrec, int rightPrec) - Overrides:
unparsein classSqlAlterTable
-