Copilot commented on code in PR #2379:
URL: https://github.com/apache/auron/pull/2379#discussion_r3541640977
##########
thirdparty/auron-iceberg/src/main/scala/org/apache/spark/sql/auron/iceberg/IcebergScanSupport.scala:
##########
@@ -382,6 +418,32 @@ object IcebergScanSupport extends Logging {
}
}
+ private def runtimeFilteredPartitions(exec: BatchScanExec):
Option[Seq[InputPartition]] = {
+ if (exec.runtimeFilters.isEmpty) {
+ return None
+ }
+
+ exec.prepare()
+ MethodUtils.invokeMethod(exec, true, "waitForSubqueries")
+ invokeDeclaredMethod(exec, "filteredPartitions") match {
+ case Some(seq: scala.collection.Seq[_]) =>
+ Some(flattenPartitions(seq))
+ case _ =>
+ None
+ }
+ }
Review Comment:
`runtimeFilteredPartitions` calls `exec.prepare()` and reflectively invokes
`waitForSubqueries` without any exception handling. If either method is absent
in a Spark version, inaccessible, or throws internally, this will fail planning
and can abort the query even though the code is intended to gracefully fall
back to the unfiltered partition planning path (as it already does when
`filteredPartitions` is unavailable). Wrap these reflective calls in `NonFatal`
handling and return `None` on failure (optionally logging at debug level).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]