Class CommentUpdate

  • All Implemented Interfaces:
    org.apache.iceberg.PendingUpdate<org.apache.iceberg.Schema>, UpdateComment

    public class CommentUpdate
    extends java.lang.Object
    implements UpdateComment
    Update comments API implementation.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.iceberg.Schema apply()
      Apply the pending changes to the original schema and returns the result.
      void commit()  
      UpdateComment updateColumnDoc​(java.lang.String name, java.lang.String doc)
      Update the comment of a column in the schema.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apache.iceberg.PendingUpdate

        updateEvent
    • Constructor Detail

    • Method Detail

      • updateColumnDoc

        public UpdateComment updateColumnDoc​(java.lang.String name,
                                             java.lang.String doc)
        Description copied from interface: UpdateComment
        Update the comment of a column in the schema.

        The name is used to find the column to update using Schema.findField(String).

        Specified by:
        updateColumnDoc in interface UpdateComment
        Parameters:
        name - name of the column whose comment is being updated
        doc - replacement comment string for the column
        Returns:
        this for method chaining
      • apply

        public org.apache.iceberg.Schema apply()
        Apply the pending changes to the original schema and returns the result.

        This does not result in a permanent update.

        Specified by:
        apply in interface org.apache.iceberg.PendingUpdate<org.apache.iceberg.Schema>
        Returns:
        the result Schema when all pending updates are applied
      • commit

        public void commit()
        Specified by:
        commit in interface org.apache.iceberg.PendingUpdate<org.apache.iceberg.Schema>