This is an automated email from the ASF dual-hosted git repository.
klion26 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/amoro.git
The following commit(s) were added to refs/heads/master by this push:
new a1f37eeb6 [Hotfix] Handle null partition values in
IcebergTableMaintainer to prevent expiration errors (#3635)
a1f37eeb6 is described below
commit a1f37eeb6cb0c46af9ba2d882287a4847a71207b
Author: Xu Bai <[email protected]>
AuthorDate: Mon Jun 30 19:58:35 2025 +0800
[Hotfix] Handle null partition values in IcebergTableMaintainer to prevent
expiration errors (#3635)
---
.../amoro/server/optimizing/maintainer/IcebergTableMaintainer.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git
a/amoro-ams/src/main/java/org/apache/amoro/server/optimizing/maintainer/IcebergTableMaintainer.java
b/amoro-ams/src/main/java/org/apache/amoro/server/optimizing/maintainer/IcebergTableMaintainer.java
index 575b3aa59..42d5428b5 100644
---
a/amoro-ams/src/main/java/org/apache/amoro/server/optimizing/maintainer/IcebergTableMaintainer.java
+++
b/amoro-ams/src/main/java/org/apache/amoro/server/optimizing/maintainer/IcebergTableMaintainer.java
@@ -1031,6 +1031,11 @@ public class IcebergTableMaintainer implements
TableMaintainer {
.apply(expireValue);
Comparable<Object> filePartitionValue =
contentFile.partition().get(pos, partitionUpperBound.getClass());
+ // if the partition value is null, can not determine if it can be
expired
+ if (filePartitionValue == null) {
+ return false;
+ }
+
int compared = filePartitionValue.compareTo(partitionUpperBound);
Boolean compareResult =
expireField.type() == Types.StringType.get() ? compared <= 0 :
compared < 0;