Package org.apache.flink.sql.parser.ddl
Class SqlAlterTable
java.lang.Object
org.apache.calcite.sql.SqlNode
org.apache.calcite.sql.SqlCall
org.apache.flink.sql.parser.ddl.SqlAlterTable
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
SqlAddPartitions,SqlAlterTableAddConstraint,SqlAlterTableDropColumn,SqlAlterTableDropConstraint,SqlAlterTableDropDistribution,SqlAlterTableDropPrimaryKey,SqlAlterTableDropWatermark,SqlAlterTableOptions,SqlAlterTableRename,SqlAlterTableRenameColumn,SqlAlterTableReset,SqlAlterTableSchema,SqlDropPartitions
public abstract class SqlAlterTable
extends org.apache.calcite.sql.SqlCall
Abstract class to describe statements like ALTER TABLE [IF EXISTS] [[catalogName.]
dataBasesName].tableName ...
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAlter table context. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final booleanstatic final org.apache.calcite.sql.SqlSpecialOperatorprotected final org.apache.calcite.sql.SqlNodeListprotected final org.apache.calcite.sql.SqlIdentifierFields inherited from class org.apache.calcite.sql.SqlNode
EMPTY_ARRAY, pos -
Constructor Summary
ConstructorsConstructorDescriptionSqlAlterTable(org.apache.calcite.sql.parser.SqlParserPos pos, org.apache.calcite.sql.SqlIdentifier tableName, boolean ifTableExists) SqlAlterTable(org.apache.calcite.sql.parser.SqlParserPos pos, org.apache.calcite.sql.SqlIdentifier tableName, org.apache.calcite.sql.SqlNodeList partitionSpec) SqlAlterTable(org.apache.calcite.sql.parser.SqlParserPos pos, org.apache.calcite.sql.SqlIdentifier tableName, org.apache.calcite.sql.SqlNodeList partitionSpec, boolean ifTableExists) -
Method Summary
Modifier and TypeMethodDescriptionString[]org.apache.calcite.sql.SqlOperatorGet partition spec as key-value strings.org.apache.calcite.sql.SqlNodeListReturns the partition spec if the ALTER should be applied to partitions, and null otherwise.org.apache.calcite.sql.SqlIdentifierbooleanWhether to ignore the error if the table doesn't exist.voidunparse(org.apache.calcite.sql.SqlWriter writer, int leftPrec, int rightPrec) Methods inherited from class org.apache.calcite.sql.SqlCall
accept, clone, equalsDeep, findValidOptions, getCallSignature, getFunctionQuantifier, getKind, getMonotonicity, getOperandList, 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
-
Field Details
-
OPERATOR
public static final org.apache.calcite.sql.SqlSpecialOperator OPERATOR -
tableIdentifier
protected final org.apache.calcite.sql.SqlIdentifier tableIdentifier -
partitionSpec
protected final org.apache.calcite.sql.SqlNodeList partitionSpec -
ifTableExists
protected final boolean ifTableExists
-
-
Constructor Details
-
SqlAlterTable
public SqlAlterTable(org.apache.calcite.sql.parser.SqlParserPos pos, org.apache.calcite.sql.SqlIdentifier tableName, @Nullable org.apache.calcite.sql.SqlNodeList partitionSpec, boolean ifTableExists) -
SqlAlterTable
public SqlAlterTable(org.apache.calcite.sql.parser.SqlParserPos pos, org.apache.calcite.sql.SqlIdentifier tableName, boolean ifTableExists) -
SqlAlterTable
public SqlAlterTable(org.apache.calcite.sql.parser.SqlParserPos pos, org.apache.calcite.sql.SqlIdentifier tableName, @Nullable org.apache.calcite.sql.SqlNodeList partitionSpec)
-
-
Method Details
-
getOperator
public org.apache.calcite.sql.SqlOperator getOperator()- Specified by:
getOperatorin classorg.apache.calcite.sql.SqlCall
-
getTableName
public org.apache.calcite.sql.SqlIdentifier getTableName() -
unparse
public void unparse(org.apache.calcite.sql.SqlWriter writer, int leftPrec, int rightPrec) - Overrides:
unparsein classorg.apache.calcite.sql.SqlCall
-
fullTableName
-
getPartitionSpec
public org.apache.calcite.sql.SqlNodeList getPartitionSpec()Returns the partition spec if the ALTER should be applied to partitions, and null otherwise. -
getPartitionKVs
Get partition spec as key-value strings. -
ifTableExists
public boolean ifTableExists()Whether to ignore the error if the table doesn't exist.- Returns:
- true when IF EXISTS is specified.
-