LuciferYang opened a new issue, #13719:
URL: https://github.com/apache/gluten/issues/13719
On Spark 3.4 and 3.5, `BatchScanExecShim` keeps its own copy of
`BatchScanExec.filteredPartitions`, and that copy still calls
`groupPartitions(newPartitions).get` after runtime filtering. Spark 3.4.4 and
3.5.5 changed this to `getOrElse(Seq.empty)` in SPARK-45652, because
`groupPartitions` returns `None` when no partition is left.
So a storage-partitioned join over a DSv2 source (for example an Iceberg
bucketed join) fails when dynamic partition pruning filters out every partition
of the key-grouped side:
```
java.util.NoSuchElementException: None.get
at
org.apache.spark.sql.execution.datasources.v2.BatchScanExecShim.filteredPartitions(BatchScanExecShim.scala)
at
org.apache.gluten.execution.BatchScanExecTransformerBase.finalPartitions(BatchScanExecTransformer.scala)
```
With `spark.sql.sources.v2.bucketing.enabled=true`,
`spark.sql.iceberg.planning.preserve-data-grouping=true` and DPP on, `select
p.price from items i, purchases p where i.id = p.item_id and i.price > 50.0`,
where both tables are partitioned by the join key and no item is priced over
50, fails with Gluten and returns no rows with vanilla Spark. It reproduces on
v1.8.0-rc1 and v1.7.0. Spark 4.x shims already use `getOrElse`.
This issue was written with the assistance of AI (Claude Opus).
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]