Class SqlAlterMaterializedTableSchema.SqlAlterMaterializedTableAddSchema
- java.lang.Object
-
- org.apache.calcite.sql.SqlNode
-
- org.apache.calcite.sql.SqlCall
-
- org.apache.calcite.sql.SqlAlter
-
- org.apache.flink.sql.parser.ddl.SqlAlterObject
-
- org.apache.flink.sql.parser.ddl.materializedtable.SqlAlterMaterializedTable
-
- org.apache.flink.sql.parser.ddl.materializedtable.SqlAlterMaterializedTableSchema
-
- org.apache.flink.sql.parser.ddl.materializedtable.SqlAlterMaterializedTableSchema.SqlAlterMaterializedTableAddSchema
-
- All Implemented Interfaces:
Cloneable,ExtendedSqlNode
- Enclosing class:
- SqlAlterMaterializedTableSchema
public static class SqlAlterMaterializedTableSchema.SqlAlterMaterializedTableAddSchema extends SqlAlterMaterializedTableSchema
Example: DDL like the below for adding column(s)/constraint/watermark.Note: adding or modifying persisted columns is not supported, only computed or metadata
-- add single column ALTER MATERIALIZED TABLE myMaterializedTable ADD c1 AS current_timestamp COMMENT 'new_column docs'; -- add multiple columns, constraint, and watermark ALTER MATERIALIZED TABLE myMaterializedTable ADD ( ts AS current_timestamp FIRST, col_meta INT METADATA FROM 'mk1' VIRTUAL AFTER col_b, PRIMARY KEY (id) NOT ENFORCED, WATERMARK FOR ts AS ts - INTERVAL '3' SECOND );
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.flink.sql.parser.ddl.materializedtable.SqlAlterMaterializedTableSchema
SqlAlterMaterializedTableSchema.SqlAlterMaterializedTableAddSchema, SqlAlterMaterializedTableSchema.SqlAlterMaterializedTableDropColumn, SqlAlterMaterializedTableSchema.SqlAlterMaterializedTableDropConstraint, SqlAlterMaterializedTableSchema.SqlAlterMaterializedTableDropPrimaryKey, SqlAlterMaterializedTableSchema.SqlAlterMaterializedTableDropSchema, SqlAlterMaterializedTableSchema.SqlAlterMaterializedTableDropWatermark, SqlAlterMaterializedTableSchema.SqlAlterMaterializedTableModifySchema
-
-
Field Summary
-
Fields inherited from class org.apache.flink.sql.parser.ddl.materializedtable.SqlAlterMaterializedTableSchema
columnList, constraints, watermark
-
Fields inherited from class org.apache.flink.sql.parser.ddl.SqlAlterObject
name
-
-
Constructor Summary
Constructors Constructor Description SqlAlterMaterializedTableAddSchema(org.apache.calcite.sql.parser.SqlParserPos pos, org.apache.calcite.sql.SqlIdentifier materializedTableName, org.apache.calcite.sql.SqlNodeList columnList, List<SqlTableConstraint> constraints, SqlWatermark sqlWatermark)
-
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.materializedtable.SqlAlterMaterializedTableSchema
getColumnPositions, getConstraints, getFullConstraint, getOperandList, getWatermark, unparseAlterOperation, validate
-
Methods inherited from class org.apache.flink.sql.parser.ddl.SqlAlterObject
getFullName, getOperator
-
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
-
SqlAlterMaterializedTableAddSchema
public SqlAlterMaterializedTableAddSchema(org.apache.calcite.sql.parser.SqlParserPos pos, org.apache.calcite.sql.SqlIdentifier materializedTableName, org.apache.calcite.sql.SqlNodeList columnList, List<SqlTableConstraint> constraints, @Nullable SqlWatermark sqlWatermark)
-
-
Method Detail
-
getAlterOperation
protected String getAlterOperation()
- Specified by:
getAlterOperationin classSqlAlterMaterializedTableSchema
-
-