Package org.apache.iceberg.data
Class PartitionStatsHandler
java.lang.Object
org.apache.iceberg.data.PartitionStatsHandler
Deprecated.
Computes, writes and reads the
PartitionStatisticsFile. Uses generic readers and writers
to support writing and reading of the stats in table default format.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.apache.iceberg.types.Types.NestedFieldDeprecated.static final org.apache.iceberg.types.Types.NestedFieldDeprecated.static final org.apache.iceberg.types.Types.NestedFieldDeprecated.static final org.apache.iceberg.types.Types.NestedFieldDeprecated.static final org.apache.iceberg.types.Types.NestedFieldDeprecated.static final org.apache.iceberg.types.Types.NestedFieldDeprecated.static final intDeprecated.static final StringDeprecated.static final org.apache.iceberg.types.Types.NestedFieldDeprecated.static final org.apache.iceberg.types.Types.NestedFieldDeprecated.static final org.apache.iceberg.types.Types.NestedFieldDeprecated.static final org.apache.iceberg.types.Types.NestedFieldDeprecated.static final org.apache.iceberg.types.Types.NestedFieldDeprecated. -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.iceberg.PartitionStatisticsFilecomputeAndWriteStatsFile(org.apache.iceberg.Table table) Deprecated.Computes and writes thePartitionStatisticsFilefor a given table's current snapshot.static org.apache.iceberg.PartitionStatisticsFilecomputeAndWriteStatsFile(org.apache.iceberg.Table table, long snapshotId) Deprecated.Computes and writes thePartitionStatisticsFilefor a given table and snapshot.static org.apache.iceberg.io.CloseableIterable<org.apache.iceberg.PartitionStats>readPartitionStatsFile(org.apache.iceberg.Schema schema, org.apache.iceberg.io.InputFile inputFile) Deprecated.Reads partition statistics from the specifiedInputFileusing given schema.static org.apache.iceberg.Schemaschema(org.apache.iceberg.types.Types.StructType unifiedPartitionType) Deprecated.Generates the partition stats file schema based on a combined partition type which considers all specs in a table.
-
Field Details
-
PARTITION_FIELD_ID
public static final int PARTITION_FIELD_IDDeprecated.- See Also:
-
PARTITION_FIELD_NAME
Deprecated.- See Also:
-
SPEC_ID
public static final org.apache.iceberg.types.Types.NestedField SPEC_IDDeprecated. -
DATA_RECORD_COUNT
public static final org.apache.iceberg.types.Types.NestedField DATA_RECORD_COUNTDeprecated. -
DATA_FILE_COUNT
public static final org.apache.iceberg.types.Types.NestedField DATA_FILE_COUNTDeprecated. -
TOTAL_DATA_FILE_SIZE_IN_BYTES
public static final org.apache.iceberg.types.Types.NestedField TOTAL_DATA_FILE_SIZE_IN_BYTESDeprecated. -
POSITION_DELETE_RECORD_COUNT
public static final org.apache.iceberg.types.Types.NestedField POSITION_DELETE_RECORD_COUNTDeprecated. -
POSITION_DELETE_FILE_COUNT
public static final org.apache.iceberg.types.Types.NestedField POSITION_DELETE_FILE_COUNTDeprecated. -
EQUALITY_DELETE_RECORD_COUNT
public static final org.apache.iceberg.types.Types.NestedField EQUALITY_DELETE_RECORD_COUNTDeprecated. -
EQUALITY_DELETE_FILE_COUNT
public static final org.apache.iceberg.types.Types.NestedField EQUALITY_DELETE_FILE_COUNTDeprecated. -
TOTAL_RECORD_COUNT
public static final org.apache.iceberg.types.Types.NestedField TOTAL_RECORD_COUNTDeprecated. -
LAST_UPDATED_AT
public static final org.apache.iceberg.types.Types.NestedField LAST_UPDATED_ATDeprecated. -
LAST_UPDATED_SNAPSHOT_ID
public static final org.apache.iceberg.types.Types.NestedField LAST_UPDATED_SNAPSHOT_IDDeprecated.
-
-
Method Details
-
schema
public static org.apache.iceberg.Schema schema(org.apache.iceberg.types.Types.StructType unifiedPartitionType) Deprecated.Generates the partition stats file schema based on a combined partition type which considers all specs in a table.- Parameters:
unifiedPartitionType- unified partition schema type. Could be calculated byPartitioning.partitionType(Table).- Returns:
- a schema that corresponds to the provided unified partition type.
-
computeAndWriteStatsFile
public static org.apache.iceberg.PartitionStatisticsFile computeAndWriteStatsFile(org.apache.iceberg.Table table) throws IOException Deprecated.Computes and writes thePartitionStatisticsFilefor a given table's current snapshot.- 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 org.apache.iceberg.PartitionStatisticsFile computeAndWriteStatsFile(org.apache.iceberg.Table table, long snapshotId) throws IOException Deprecated.Computes and writes thePartitionStatisticsFilefor a given table and snapshot.- 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
-
readPartitionStatsFile
public static org.apache.iceberg.io.CloseableIterable<org.apache.iceberg.PartitionStats> readPartitionStatsFile(org.apache.iceberg.Schema schema, org.apache.iceberg.io.InputFile inputFile) Deprecated.Reads partition statistics from the specifiedInputFileusing given schema.- Parameters:
schema- TheSchemaof the partition statistics file.inputFile- AnInputFilepointing to the partition stats file.
-
PartitionStatsHandlerfrom core module