Class TableChange.ModifyColumn

java.lang.Object
org.apache.flink.table.catalog.TableChange.ModifyColumn
All Implemented Interfaces:
TableChange, TableChange.CatalogTableChange
Direct Known Subclasses:
TableChange.ModifyColumnComment, TableChange.ModifyColumnName, TableChange.ModifyColumnPosition, TableChange.ModifyPhysicalColumnType
Enclosing interface:
TableChange

@PublicEvolving public static class TableChange.ModifyColumn extends Object implements TableChange.CatalogTableChange
A base schema change to modify a column. The modification includes:
  • change column data type
  • reorder column position
  • modify column comment
  • rename column name
  • change the computed expression
  • change the metadata column expression

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>
 
  • Field Details

  • Constructor Details

  • Method Details

    • getOldColumn

      public Column getOldColumn()
      Returns the original Column instance.
    • getNewColumn

      public Column getNewColumn()
      Returns the modified Column instance.
    • getNewPosition

      @Nullable public TableChange.ColumnPosition getNewPosition()
      Returns the position of the modified 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.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object