Class SqlAlterTableDrop
- java.lang.Object
-
- org.apache.calcite.sql.SqlNode
-
- org.apache.calcite.sql.SqlCall
-
- org.apache.calcite.sql.SqlAlter
-
- org.apache.flink.sql.parser.ddl.table.SqlAlterTable
-
- org.apache.flink.sql.parser.ddl.table.SqlAlterTableSchema
-
- org.apache.flink.sql.parser.ddl.table.SqlAlterTableDrop
-
- All Implemented Interfaces:
Cloneable,ExtendedSqlNode
- Direct Known Subclasses:
SqlAlterTableDrop.SqlAlterTableDropColumn,SqlAlterTableDrop.SqlAlterTableDropConstraint,SqlAlterTableDrop.SqlAlterTableDropPrimaryKey,SqlAlterTableDrop.SqlAlterTableDropWatermark
public abstract class SqlAlterTableDrop extends SqlAlterTableSchema
SqlNode to describe ALTER TABLE [IF EXISTS ]table_name DROP column/constraint/watermark clause.Example: DDL like the below for dropping column/constraint/watermark.
-- drop a column (only drop of non persisted is allowed) ALTER MATERIALIZED TABLE materializedTable DROP col1; -- drop several columns ALTER MATERIALIZED TABLE materializedTable DROP (col1, col2, col3); -- drop a primary key ALTER MATERIALIZED TABLE materializedTable DROP PRIMARY KEY; -- drop a constraint by name ALTER MATERIALIZED TABLE materializedTable DROP CONSTRAINT constraint_name; -- drop a watermark ALTER MATERIALIZED TABLE materializedTable DROP WATERMARK;
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSqlAlterTableDrop.SqlAlterTableDropColumnSqlNode to describe ALTER TABLE [IF EXISTS ]table_name DROP column clause.static classSqlAlterTableDrop.SqlAlterTableDropConstraintALTER TABLE [IF EXISTS ][catalog_name.]static classSqlAlterTableDrop.SqlAlterTableDropPrimaryKeyALTER TABLE [IF EXISTS ][catalog_name.]static classSqlAlterTableDrop.SqlAlterTableDropWatermarkALTER TABLE [IF EXISTS ][catalog_name.]
-
Field Summary
-
Fields inherited from class org.apache.flink.sql.parser.ddl.table.SqlAlterTableSchema
columnList, constraints, watermark
-
Fields inherited from class org.apache.flink.sql.parser.ddl.table.SqlAlterTable
ifTableExists, OPERATOR, partitionSpec, tableIdentifier
-
-
Constructor Summary
Constructors Constructor Description SqlAlterTableDrop(org.apache.calcite.sql.parser.SqlParserPos pos, org.apache.calcite.sql.SqlIdentifier tableName, boolean ifTableExists)SqlAlterTableDrop(org.apache.calcite.sql.parser.SqlParserPos pos, org.apache.calcite.sql.SqlIdentifier tableName, org.apache.calcite.sql.SqlNodeList modifiedColumns, List<SqlTableConstraint> constraints, SqlWatermark watermark, boolean ifTableExists)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected StringgetAlterOperation()List<org.apache.calcite.sql.SqlNode>getOperandList()voidunparseAlterOperation(org.apache.calcite.sql.SqlWriter writer, int leftPrec, int rightPrec)protected abstract voidunparseDropOperation(org.apache.calcite.sql.SqlWriter writer, int leftPrec, int rightPrec)-
Methods inherited from class org.apache.flink.sql.parser.ddl.table.SqlAlterTableSchema
getColumnPositions, getConstraints, getFullConstraint, getWatermark, validate
-
Methods inherited from class org.apache.flink.sql.parser.ddl.table.SqlAlterTable
fullTableName, getOperator, getPartitionKVs, getPartitionSpec, getTableName, ifTableExists
-
Methods inherited from class org.apache.calcite.sql.SqlCall
accept, clone, equalsDeep, findValidOptions, getCallSignature, getFunctionQuantifier, getKind, getMonotonicity, isCountStar, isExpanded, operand, operandCount, setOperand, validate
-
-
-
-
Constructor Detail
-
SqlAlterTableDrop
public SqlAlterTableDrop(org.apache.calcite.sql.parser.SqlParserPos pos, org.apache.calcite.sql.SqlIdentifier tableName, org.apache.calcite.sql.SqlNodeList modifiedColumns, List<SqlTableConstraint> constraints, @Nullable SqlWatermark watermark, boolean ifTableExists)
-
SqlAlterTableDrop
public SqlAlterTableDrop(org.apache.calcite.sql.parser.SqlParserPos pos, org.apache.calcite.sql.SqlIdentifier tableName, boolean ifTableExists)
-
-
Method Detail
-
unparseDropOperation
protected abstract void unparseDropOperation(org.apache.calcite.sql.SqlWriter writer, int leftPrec, int rightPrec)
-
getOperandList
public List<org.apache.calcite.sql.SqlNode> getOperandList()
- Overrides:
getOperandListin classSqlAlterTableSchema
-
getAlterOperation
protected String getAlterOperation()
- Specified by:
getAlterOperationin classSqlAlterTableSchema
-
unparseAlterOperation
public void unparseAlterOperation(org.apache.calcite.sql.SqlWriter writer, int leftPrec, int rightPrec)- Overrides:
unparseAlterOperationin classSqlAlterTableSchema
-
-