From 12d3b917b6fba3b80ddfd37df55a130d68287d44 Mon Sep 17 00:00:00 2001 From: guihuawen Date: Sun, 3 May 2026 16:33:07 +0800 Subject: [PATCH 1/4] [AURON #2229] Silent fallback to empty partitions may cause data loss #2229 --- .../apache/spark/sql/auron/iceberg/IcebergScanSupport.scala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/thirdparty/auron-iceberg/src/main/scala/org/apache/spark/sql/auron/iceberg/IcebergScanSupport.scala b/thirdparty/auron-iceberg/src/main/scala/org/apache/spark/sql/auron/iceberg/IcebergScanSupport.scala index 1d9efbc3b..2da08514a 100644 --- a/thirdparty/auron-iceberg/src/main/scala/org/apache/spark/sql/auron/iceberg/IcebergScanSupport.scala +++ b/thirdparty/auron-iceberg/src/main/scala/org/apache/spark/sql/auron/iceberg/IcebergScanSupport.scala @@ -190,7 +190,10 @@ object IcebergScanSupport extends Logging { logWarning( s"Failed to obtain input partitions via reflection for ${exec.getClass.getName}.", t) - Seq.empty + throw new IllegalStateException( + s"Cannot resolve input partitions for ${exec.getClass.getName}", + t + ) } } From d90aae53ae5327ab3f85bd64887cc8543f5e3acc Mon Sep 17 00:00:00 2001 From: guihuawen Date: Sun, 3 May 2026 17:05:34 +0800 Subject: [PATCH 2/4] [AURON #2229] Silent fallback to empty partitions may cause data loss --- .../apache/spark/sql/auron/iceberg/IcebergScanSupport.scala | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/thirdparty/auron-iceberg/src/main/scala/org/apache/spark/sql/auron/iceberg/IcebergScanSupport.scala b/thirdparty/auron-iceberg/src/main/scala/org/apache/spark/sql/auron/iceberg/IcebergScanSupport.scala index 2da08514a..1ab0e803a 100644 --- a/thirdparty/auron-iceberg/src/main/scala/org/apache/spark/sql/auron/iceberg/IcebergScanSupport.scala +++ b/thirdparty/auron-iceberg/src/main/scala/org/apache/spark/sql/auron/iceberg/IcebergScanSupport.scala @@ -192,8 +192,7 @@ object IcebergScanSupport extends Logging { t) throw new IllegalStateException( s"Cannot resolve input partitions for ${exec.getClass.getName}", - t - ) + t) } } From b22d938f2b64c47aa48199679aca38bd420f2430 Mon Sep 17 00:00:00 2001 From: guihuawen Date: Wed, 6 May 2026 12:54:19 +0800 Subject: [PATCH 3/4] [AURON #2229] Silent fallback to empty partitions may cause data loss --- .../spark/sql/auron/iceberg/IcebergScanSupport.scala | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/thirdparty/auron-iceberg/src/main/scala/org/apache/spark/sql/auron/iceberg/IcebergScanSupport.scala b/thirdparty/auron-iceberg/src/main/scala/org/apache/spark/sql/auron/iceberg/IcebergScanSupport.scala index 1ab0e803a..8a5a5b9a5 100644 --- a/thirdparty/auron-iceberg/src/main/scala/org/apache/spark/sql/auron/iceberg/IcebergScanSupport.scala +++ b/thirdparty/auron-iceberg/src/main/scala/org/apache/spark/sql/auron/iceberg/IcebergScanSupport.scala @@ -78,7 +78,14 @@ object IcebergScanSupport extends Logging { return None } - val partitions = inputPartitions(exec) + val partitions = + try { + inputPartitions(exec) + } catch { + case e: IllegalStateException => + logWarning(s"get Partition error: ${e.getMessage}") + return None + } // Empty scan (e.g. empty table) should still build a plan to return no rows. if (partitions.isEmpty) { logWarning(s"Native Iceberg scan planned with empty partitions for $scanClassName.") From b21d100280bc9f5e8be1394e4a27767b2d7b3559 Mon Sep 17 00:00:00 2001 From: guihuawen Date: Wed, 6 May 2026 14:03:18 +0800 Subject: [PATCH 4/4] [AURON #2229] Silent fallback to empty partitions may cause data loss --- .../org/apache/spark/sql/auron/iceberg/IcebergScanSupport.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thirdparty/auron-iceberg/src/main/scala/org/apache/spark/sql/auron/iceberg/IcebergScanSupport.scala b/thirdparty/auron-iceberg/src/main/scala/org/apache/spark/sql/auron/iceberg/IcebergScanSupport.scala index 8a5a5b9a5..8f02632ac 100644 --- a/thirdparty/auron-iceberg/src/main/scala/org/apache/spark/sql/auron/iceberg/IcebergScanSupport.scala +++ b/thirdparty/auron-iceberg/src/main/scala/org/apache/spark/sql/auron/iceberg/IcebergScanSupport.scala @@ -83,7 +83,7 @@ object IcebergScanSupport extends Logging { inputPartitions(exec) } catch { case e: IllegalStateException => - logWarning(s"get Partition error: ${e.getMessage}") + logWarning(s"Get Partition error: ${e.getMessage}") return None } // Empty scan (e.g. empty table) should still build a plan to return no rows.