sunchao commented on code in PR #5423:
URL: https://github.com/apache/datafusion-comet/pull/5423#discussion_r3846536589


##########
spark/src/main/scala/org/apache/spark/sql/comet/CometMetricNode.scala:
##########
@@ -61,6 +61,17 @@ case class CometMetricNode(metrics: Map[String, SQLMetric], 
children: Seq[CometM
     else children.flatMap(_.leafNodes)
   }
 
+  private[comet] def withoutAggregateMetrics(plan: SparkPlan): CometMetricNode 
=

Review Comment:
   Good point. Range partitioning executes the native child once to sample 
partition boundaries and then again for the real shuffle. If aggregate metrics 
are updated in both passes, spill count, spilled bytes/rows, and peak native 
memory are counted twice. The sampling pass therefore suppresses only aggregate 
metrics; scan/input and other operator metrics remain intact, and the real 
shuffle execution reports aggregate metrics normally. This is why the filtering 
helper needs an explanatory comment.



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