Class SetStatistics

java.lang.Object
org.apache.iceberg.SetStatistics
All Implemented Interfaces:
PendingUpdate<List<StatisticsFile>>, UpdateStatistics

public class SetStatistics extends Object implements UpdateStatistics
  • Constructor Details

  • Method Details

    • setStatistics

      public UpdateStatistics setStatistics(StatisticsFile statisticsFile)
      Description copied from interface: UpdateStatistics
      Set the table's statistics file for given snapshot, replacing the previous statistics file for the snapshot if any exists. The snapshot id of the statistics file will be used.
      Specified by:
      setStatistics in interface UpdateStatistics
      Returns:
      this for method chaining
    • removeStatistics

      public UpdateStatistics removeStatistics(long snapshotId)
      Description copied from interface: UpdateStatistics
      Remove the table's statistics file for given snapshot.
      Specified by:
      removeStatistics in interface UpdateStatistics
      Returns:
      this for method chaining
    • apply

      public List<StatisticsFile> apply()
      Description copied from interface: PendingUpdate
      Apply the pending changes and return the uncommitted changes for validation.

      This does not result in a permanent update.

      Specified by:
      apply in interface PendingUpdate<List<StatisticsFile>>
      Returns:
      the uncommitted changes that would be committed by calling PendingUpdate.commit()
    • commit

      public void commit()
      Description copied from interface: PendingUpdate
      Apply the pending changes and commit.

      Changes are committed by calling the underlying table's commit method.

      Once the commit is successful, the updated table will be refreshed.

      Specified by:
      commit in interface PendingUpdate<List<StatisticsFile>>