Class SqlAlterTableAdd
- 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.SqlAlterTableAdd
-
- All Implemented Interfaces:
Cloneable,ExtendedSqlNode
public class SqlAlterTableAdd extends SqlAlterTableSchema
SqlNode to describe ALTER TABLE [IF EXISTS] table_name ADD column/constraint/watermark clause.Example: DDL like the below for adding column(s)/constraint/watermark.
-- add single column ALTER TABLE mytable ADD new_column STRING COMMENT 'new_column docs'; -- add multiple columns, constraint, and watermark ALTER TABLE mytable ADD ( log_ts STRING COMMENT 'log timestamp string' FIRST, ts AS TO_TIMESTAMP(log_ts) AFTER log_ts, col_meta INT METADATA FROM 'mk1' VIRTUAL AFTER col_b, PRIMARY KEY (id) NOT ENFORCED, WATERMARK FOR ts AS ts - INTERVAL '3' SECOND );
-
-
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 SqlAlterTableAdd(org.apache.calcite.sql.parser.SqlParserPos pos, org.apache.calcite.sql.SqlIdentifier tableName, org.apache.calcite.sql.SqlNodeList addedColumns, List<SqlTableConstraint> constraint, SqlWatermark sqlWatermark, boolean ifTableExists)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringgetAlterOperation()-
Methods inherited from class org.apache.flink.sql.parser.ddl.table.SqlAlterTableSchema
getColumnPositions, getConstraints, getFullConstraint, getOperandList, getWatermark, unparseAlterOperation, 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
-
SqlAlterTableAdd
public SqlAlterTableAdd(org.apache.calcite.sql.parser.SqlParserPos pos, org.apache.calcite.sql.SqlIdentifier tableName, org.apache.calcite.sql.SqlNodeList addedColumns, List<SqlTableConstraint> constraint, @Nullable SqlWatermark sqlWatermark, boolean ifTableExists)
-
-
Method Detail
-
getAlterOperation
protected String getAlterOperation()
- Specified by:
getAlterOperationin classSqlAlterTableSchema
-
-