@PublicEvolving public static class TableChange.ModifyColumn extends Object implements TableChange
Some fine-grained column changes are defined in the TableChange.ModifyPhysicalColumnType
,
TableChange.ModifyColumnComment
, TableChange.ModifyColumnPosition
and TableChange.ModifyColumnName
.
It is equal to the following statement:
ALTER TABLE <table_name> MODIFY <column_definition> COMMENT '<column_comment>' <column_position>
TableChange.AddColumn, TableChange.AddUniqueConstraint, TableChange.AddWatermark, TableChange.After, TableChange.ColumnPosition, TableChange.DropColumn, TableChange.DropConstraint, TableChange.DropWatermark, TableChange.First, TableChange.ModifyColumn, TableChange.ModifyColumnComment, TableChange.ModifyColumnName, TableChange.ModifyColumnPosition, TableChange.ModifyPhysicalColumnType, TableChange.ModifyUniqueConstraint, TableChange.ModifyWatermark, TableChange.ResetOption, TableChange.SetOption
Modifier and Type | Field and Description |
---|---|
protected Column |
newColumn |
protected TableChange.ColumnPosition |
newPosition |
protected Column |
oldColumn |
Constructor and Description |
---|
ModifyColumn(Column oldColumn,
Column newColumn,
TableChange.ColumnPosition newPosition) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Column |
getNewColumn()
Returns the modified
Column instance. |
TableChange.ColumnPosition |
getNewPosition()
Returns the position of the modified
Column instance. |
Column |
getOldColumn()
Returns the original
Column instance. |
int |
hashCode() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
add, add, add, add, dropColumn, dropConstraint, dropWatermark, modify, modify, modify, modifyColumnComment, modifyColumnName, modifyColumnPosition, modifyPhysicalColumnType, reset, set
protected final Column oldColumn
protected final Column newColumn
@Nullable protected final TableChange.ColumnPosition newPosition
public ModifyColumn(Column oldColumn, Column newColumn, @Nullable TableChange.ColumnPosition newPosition)
@Nullable public TableChange.ColumnPosition getNewPosition()
Column
instance. When the return value is
null, it means modify the column at the original position. When the return value is
FIRST, it means move the modified column to the first. When the return value is AFTER, it
means move the column after the referred column.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.