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..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 @@ -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.") @@ -190,7 +197,9 @@ 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) } }