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,SqlAlterTableCompact,SqlAlterTableDropColumn,SqlAlterTableDropConstraint,SqlAlterTableDropPrimaryKey,SqlAlterTableDropWatermark,SqlAlterTableOptions,SqlAlterTableRename,SqlAlterTableRenameColumn,SqlAlterTableReset,SqlAlterTableSchema,SqlDropPartitions
public abstract class SqlAlterTable extends org.apache.calcite.sql.SqlCallAbstract class to describe statements like ALTER TABLE [IF EXISTS] [[catalogName.] dataBasesName].tableName ...
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSqlAlterTable.AlterTableContextAlter table context.
-
Field Summary
Fields Modifier and Type Field Description protected booleanifTableExistsstatic org.apache.calcite.sql.SqlSpecialOperatorOPERATORprotected org.apache.calcite.sql.SqlNodeListpartitionSpecprotected org.apache.calcite.sql.SqlIdentifiertableIdentifier
-
Constructor Summary
Constructors Constructor Description SqlAlterTable(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]fullTableName()org.apache.calcite.sql.SqlOperatorgetOperator()LinkedHashMap<String,String>getPartitionKVs()Get partition spec as key-value strings.org.apache.calcite.sql.SqlNodeListgetPartitionSpec()Returns the partition spec if the ALTER should be applied to partitions, and null otherwise.org.apache.calcite.sql.SqlIdentifiergetTableName()booleanifTableExists()Whether 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, validate
-
-
-
-
Field Detail
-
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 Detail
-
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 Detail
-
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
public String[] 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
public LinkedHashMap<String,String> 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.
-
-