diff --git a/amoro-core/src/main/java/org/apache/amoro/optimizing/IcebergRewriteExecutor.java b/amoro-core/src/main/java/org/apache/amoro/optimizing/IcebergRewriteExecutor.java index fa355a8bfa..d172221720 100644 --- a/amoro-core/src/main/java/org/apache/amoro/optimizing/IcebergRewriteExecutor.java +++ b/amoro-core/src/main/java/org/apache/amoro/optimizing/IcebergRewriteExecutor.java @@ -24,7 +24,6 @@ import org.apache.amoro.table.MixedTable; import org.apache.amoro.utils.map.StructLikeCollections; import org.apache.iceberg.PartitionSpec; -import org.apache.iceberg.StructLike; import org.apache.iceberg.TableProperties; import org.apache.iceberg.data.GenericAppenderFactory; import org.apache.iceberg.data.IdentityPartitionConverters; @@ -46,18 +45,6 @@ public IcebergRewriteExecutor( super(input, table, structLikeCollections); } - // TODO We can remove this override method after upgrading Iceberg version to 1.5+. - @Override - protected StructLike partition() { - StructLike partitionData = super.partition(); - if (partitionData != null && partitionData.size() == 0) { - // Cast empty partition data to NULL to avoid creating empty partition directory. - return null; - } else { - return partitionData; - } - } - @Override protected OptimizingDataReader dataReader() { return new GenericCombinedIcebergDataReader(