Package org.apache.iceberg
Class SetStatistics
- java.lang.Object
-
- org.apache.iceberg.SetStatistics
-
- All Implemented Interfaces:
PendingUpdate<java.util.List<StatisticsFile>>
,UpdateStatistics
public class SetStatistics extends java.lang.Object implements UpdateStatistics
-
-
Constructor Summary
Constructors Constructor Description SetStatistics(TableOperations ops)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<StatisticsFile>
apply()
Apply the pending changes and return the uncommitted changes for validation.void
commit()
Apply the pending changes and commit.UpdateStatistics
removeStatistics(long snapshotId)
Remove the table's statistics file for given snapshot.UpdateStatistics
setStatistics(long snapshotId, StatisticsFile statisticsFile)
Set the table's statistics file for given snapshot, replacing the previous statistics file for the snapshot if any exists.-
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
-
SetStatistics
public SetStatistics(TableOperations ops)
-
-
Method Detail
-
setStatistics
public UpdateStatistics setStatistics(long snapshotId, 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.- Specified by:
setStatistics
in interfaceUpdateStatistics
- 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 interfaceUpdateStatistics
- Returns:
- this for method chaining
-
apply
public java.util.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 interfacePendingUpdate<java.util.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 interfacePendingUpdate<java.util.List<StatisticsFile>>
-
-