Class TableChange.DeleteColumn

java.lang.Object
org.apache.gravitino.rel.TableChange.DeleteColumn
All Implemented Interfaces:
TableChange, TableChange.ColumnChange
Enclosing interface:
TableChange

public static final class TableChange.DeleteColumn extends Object implements TableChange.ColumnChange
A TableChange to delete a field.

If the field does not exist, the change must result in an IllegalArgumentException.

  • Method Details

    • getFieldName

      public String[] getFieldName()
      Retrieves the field name of the column to be deleted.
      Returns:
      An array of strings representing the field name.
    • getIfExists

      public Boolean getIfExists()
      Checks if the field should be deleted only if it exists.
      Returns:
      true if the field should be deleted only if it exists; false otherwise.
    • equals

      public boolean equals(Object o)
      Compares this DeleteColumn instance with another object for equality. The comparison is based on the field name array and the 'ifExists' flag.
      Overrides:
      equals in class Object
      Parameters:
      o - The object to compare with this instance.
      Returns:
      true if the given object represents the same field deletion; false otherwise.
    • hashCode

      public int hashCode()
      Generates a hash code for this DeleteColumn instance. The hash code is based on both the hierarchical field name and the 'ifExists' flag.
      Overrides:
      hashCode in class Object
      Returns:
      A hash code value for this field deletion operation.
    • fieldName

      public String[] fieldName()
      Description copied from interface: TableChange.ColumnChange
      Retrieves the field name of the column to be modified.
      Specified by:
      fieldName in interface TableChange.ColumnChange
      Returns:
      An array of strings representing the field name.