baibaichen opened a new issue, #11468: URL: https://github.com/apache/incubator-gluten/issues/11468
### Description `GroupLeafExec` in RAS (Ras-based Adaptive Search optimizer) always returns `UnknownPartitioning` for `outputPartitioning`, which causes incorrect behavior when `spark.sql.unionOutputPartitioning=true` (default in Spark 4.1). ### Background Spark 4.1 introduced https://github.com/apache/spark/pull/51623 which allows `UnionExec` to preserve child partitioning. When all children have identical partitioning, Spark's optimizer trusts this information and may omit downstream Exchange operators. However, in RAS, `GroupLeafExec` does not preserve the `outputPartitioning` from its wrapped plan, always returning `UnknownPartitioning`. This breaks the partitioning contract and can lead to incorrect query results. ### Workaround Disable the feature by setting `spark.sql.unionOutputPartitioning=false` when using RAS. ### Proposed Solution `GroupLeafExec` should override `outputPartitioning` to return the correct partitioning from the underlying plan. ### Related - Spark PR: https://github.com/apache/spark/pull/51623 - Gluten PR: https://github.com/apache/incubator-gluten/pull/11455 -- 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]
