Class TableChange.UpdateColumnComment

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

public static final class TableChange.UpdateColumnComment extends Object implements TableChange.ColumnChange
A TableChange to update the comment of a field.

The field names are used to find the field to update.

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 whose comment is being updated.
      Returns:
      An array of strings representing the field name.
    • getNewComment

      public String getNewComment()
      Retrieves the new comment for the column.
      Returns:
      The new comment of the column.
    • equals

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

      public int hashCode()
      Generates a hash code for this UpdateColumnComment instance. The hash code is based on both the hierarchical field name and the new comment.
      Overrides:
      hashCode in class Object
      Returns:
      A hash code value for this comment update 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.