viirya commented on code in PR #6439:
URL: https://github.com/apache/datafusion-comet/pull/6439#discussion_r4147175498


##########
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:
   Could the comment name where the nesting comes from? Something like: 
"`revertUnsafePartialAggregates` re-runs `transform` over a subtree whose query 
stages are already wrapped, so a stage can end up as 
`CometSinkPlaceHolder(CometSinkPlaceHolder(stage))`." On the scan wrapper line, 
it would help to say that the explicit recursion is also what preserves the old 
coverage of the wrapped plan's descendants, not only nested wrappers. Otherwise 
someone may later drop it as purely defensive.



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

Reply via email to