Package org.apache.iceberg
Class PartitionStatsHandler
java.lang.Object
org.apache.iceberg.PartitionStatsHandler
Computes, writes and reads the
PartitionStatisticsFile. Uses generic readers and writers
to support writing and reading of the stats in table default format.-
Method Summary
Modifier and TypeMethodDescriptionstatic PartitionStatisticsFilecomputeAndWriteStatsFile(Table table) Computes the stats incrementally after the snapshot that has partition stats file till the current snapshot and writes the combined result into aPartitionStatisticsFileafter merging the stats for a given table's current snapshot.static PartitionStatisticsFilecomputeAndWriteStatsFile(Table table, long snapshotId) Computes the stats incrementally after the snapshot that has partition stats file till the given snapshot and writes the combined result into aPartitionStatisticsFileafter merging the stats for a given snapshot.
-
Method Details
-
computeAndWriteStatsFile
Computes the stats incrementally after the snapshot that has partition stats file till the current snapshot and writes the combined result into aPartitionStatisticsFileafter merging the stats for a given table's current snapshot.Does a full compute if previous statistics file does not exist.
- Parameters:
table- TheTablefor which the partition statistics is computed.- Returns:
PartitionStatisticsFilefor the current snapshot, or null if no statistics are present.- Throws:
IOException
-
computeAndWriteStatsFile
public static PartitionStatisticsFile computeAndWriteStatsFile(Table table, long snapshotId) throws IOException Computes the stats incrementally after the snapshot that has partition stats file till the given snapshot and writes the combined result into aPartitionStatisticsFileafter merging the stats for a given snapshot.Does a full compute if previous statistics file does not exist.
- Parameters:
table- TheTablefor which the partition statistics is computed.snapshotId- snapshot for which partition statistics are computed.- Returns:
PartitionStatisticsFilefor the given snapshot, or null if no statistics are present.- Throws:
IOException
-