zhztheplayer opened a new pull request, #51183: URL: https://github.com/apache/spark/pull/51183
### What changes were proposed in this pull request? The PR removes the unnecessary assertion in `ColumnarToRowExec` introduced by https://github.com/apache/spark/pull/25264 to guarantee some flexibilities for 3rd Spark plugins. Especially in Apache Gluten, the assertion blocks some of our effort in query optimization because we needed an intermediate state of the query plan which Spark may see as illegal. Moreover, the reason why this intermediate state is needed in Gluten: Gluten has a cascades-style query optimizer (RAS) which could set a leaf, dummy, row-based plan node to hide up a sub-tree of the plan, to represent a so-called cascades 'group'. Although this pattern (C2R on a row-based plan) is illegal, it could be used as the input of an optimizer rule to potentially be used to convert into a valid query plan. This change is to remove the assertion to ensure some flexibilities to the 3rd plugins. This should be no harm for the upstream Apache Spark, because the query execution will still be failed by [this error](https://github.com/apache/spark/blob/5d0b2f41794bf4dd25b3ce19bc4f634082b40876/sql/core/src/main/scala/org/apache/spark/sql/execution/SparkPlan.scala#L343-L351) without this assertion on an illegal query plan. ### Does this PR introduce _any_ user-facing change? Basically no. An assertion error in plan-building time will be replaced by an exception in execution time (still from the driver side) when an illegal query plan is set. ### How was this patch tested? Existing UTs. -- 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]
