From 69a88211a9658004011a3d975b8c86c577021cbf Mon Sep 17 00:00:00 2001 From: Amogh Jahagirdar Date: Tue, 5 Nov 2024 11:06:16 -0700 Subject: [PATCH] Core: Change delete file granularity to file --- core/src/main/java/org/apache/iceberg/TableMetadata.java | 2 ++ core/src/main/java/org/apache/iceberg/TableProperties.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/core/src/main/java/org/apache/iceberg/TableMetadata.java b/core/src/main/java/org/apache/iceberg/TableMetadata.java index 3cdc53995dce..f9822243dbf9 100644 --- a/core/src/main/java/org/apache/iceberg/TableMetadata.java +++ b/core/src/main/java/org/apache/iceberg/TableMetadata.java @@ -90,6 +90,8 @@ private static Map persistedProperties(Map rawPr persistedProperties.put( TableProperties.PARQUET_COMPRESSION, TableProperties.PARQUET_COMPRESSION_DEFAULT_SINCE_1_4_0); + persistedProperties.put( + TableProperties.DELETE_GRANULARITY, TableProperties.DELETE_GRANULARITY_DEFAULT_SINCE_1_8_0); rawProperties.entrySet().stream() .filter(entry -> !TableProperties.RESERVED_PROPERTIES.contains(entry.getKey())) diff --git a/core/src/main/java/org/apache/iceberg/TableProperties.java b/core/src/main/java/org/apache/iceberg/TableProperties.java index c137bcd3a2c3..4633bae922bf 100644 --- a/core/src/main/java/org/apache/iceberg/TableProperties.java +++ b/core/src/main/java/org/apache/iceberg/TableProperties.java @@ -354,6 +354,8 @@ private TableProperties() {} public static final String DELETE_GRANULARITY = "write.delete.granularity"; public static final String DELETE_GRANULARITY_DEFAULT = DeleteGranularity.PARTITION.toString(); + public static final String DELETE_GRANULARITY_DEFAULT_SINCE_1_8_0 = + DeleteGranularity.FILE.toString(); public static final String DELETE_ISOLATION_LEVEL = "write.delete.isolation-level"; public static final String DELETE_ISOLATION_LEVEL_DEFAULT = "serializable";