lyne7-sc commented on code in PR #2391:
URL: https://github.com/apache/auron/pull/2391#discussion_r3610813993


##########
thirdparty/auron-iceberg/src/main/scala/org/apache/spark/sql/auron/iceberg/IcebergScanSupport.scala:
##########
@@ -391,6 +425,57 @@ object IcebergScanSupport extends Logging {
   private def deletesEmpty(deletes: java.util.List[_]): Boolean =
     deletes == null || deletes.isEmpty
 
+  private def plannedInputPartitions(exec: BatchScanExec, useRuntimeFilters: 
Boolean)
+      : Option[(Seq[InputPartition], Option[Seq[Seq[InputPartition]]])] = {
+    exec.outputPartitioning match {
+      case partitioning: KeyGroupedPartitioning =>
+        // Runtime filtering can change the final groups after static 
planning. Keep this
+        // combination on Spark until native execution can preserve those 
dynamic groups.
+        if (exec.runtimeFilters.nonEmpty) {

Review Comment:
   Thanks for the detailed explanation! That makes sense to me.
   
   I updated the check to ignore 
`DynamicPruningExpression(Literal.TrueLiteral)` while continuing to fall back 
to Spark for effective runtime filters.
   
   I also added coverage for both sides:
   
   - A no-op `TrueLiteral` runtime filter keeps the scan native and preserves 
`KeyGroupedPartitioning`.
   - An effective runtime filter keeps the fact scan as `BatchScanExec`.



-- 
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]

Reply via email to