Class AddColumnEvent
- java.lang.Object
-
- org.apache.flink.cdc.common.event.AddColumnEvent
-
- All Implemented Interfaces:
Serializable,ChangeEvent,Event,SchemaChangeEvent
@PublicEvolving public final class AddColumnEvent extends Object implements SchemaChangeEvent
ASchemaChangeEventthat represents anADD COLUMNDDL, which may contain the lenient column type changes.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAddColumnEvent.ColumnPositionrelative Position of column.static classAddColumnEvent.ColumnWithPositionrepresents result of an ADD COLUMN DDL that may change column sequence.
-
Constructor Summary
Constructors Constructor Description AddColumnEvent(TableId tableId, List<AddColumnEvent.ColumnWithPosition> addedColumns)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AddColumnEvent.ColumnWithPositionafter(Column addColumn, String existedColumnName)static AddColumnEvent.ColumnWithPositionbefore(Column addColumn, String existedColumnName)SchemaChangeEventcopy(TableId newTableId)Creates a copy ofSchemaChangeEventwith newTableId.booleanequals(Object o)static AddColumnEvent.ColumnWithPositionfirst(Column addColumn)List<AddColumnEvent.ColumnWithPosition>getAddedColumns()Returns the added columns.SchemaChangeEventTypegetType()Returns itsSchemaChangeEventType.inthashCode()static AddColumnEvent.ColumnWithPositionlast(Column addColumn)TableIdtableId()Describes the database table corresponding to the occurrence of a change event.StringtoString()
-
-
-
Constructor Detail
-
AddColumnEvent
public AddColumnEvent(TableId tableId, List<AddColumnEvent.ColumnWithPosition> addedColumns)
-
-
Method Detail
-
first
public static AddColumnEvent.ColumnWithPosition first(Column addColumn)
-
last
public static AddColumnEvent.ColumnWithPosition last(Column addColumn)
-
before
public static AddColumnEvent.ColumnWithPosition before(Column addColumn, String existedColumnName)
-
after
public static AddColumnEvent.ColumnWithPosition after(Column addColumn, String existedColumnName)
-
getAddedColumns
public List<AddColumnEvent.ColumnWithPosition> getAddedColumns()
Returns the added columns.
-
tableId
public TableId tableId()
Description copied from interface:ChangeEventDescribes the database table corresponding to the occurrence of a change event.- Specified by:
tableIdin interfaceChangeEvent
-
getType
public SchemaChangeEventType getType()
Description copied from interface:SchemaChangeEventReturns itsSchemaChangeEventType.- Specified by:
getTypein interfaceSchemaChangeEvent
-
copy
public SchemaChangeEvent copy(TableId newTableId)
Description copied from interface:SchemaChangeEventCreates a copy ofSchemaChangeEventwith newTableId.- Specified by:
copyin interfaceSchemaChangeEvent
-
-