sunchao commented on code in PR #6439:
URL: https://github.com/apache/datafusion-comet/pull/6439#discussion_r4147479411
##########
spark/src/main/scala/org/apache/comet/rules/CometExecRule.scala:
##########
@@ -62,6 +62,13 @@ import org.apache.comet.shims.{CometTypeShim,
ShimCometStreaming, ShimCometWindo
object CometExecRule {
+ private[rules] def removePlaceholders(plan: SparkPlan): SparkPlan =
plan.transformUp {
+ // Recursive conversion can nest sinks. Remove the inner one before
exposing its parent.
Review Comment:
Updated in 1627bd7d5. The sink comment now names
`revertUnsafePartialAggregates` and shows how re-running `transform` produces
nested stage wrappers. The scan comment explains that explicit recursion
preserves cleanup of the wrapped plan’s descendants as well as wrappers at its
root. The full `CometExecRuleSuite` passes (86 tests, Spark 4.1.3 / JDK 21).
--
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]