cloud-fan commented on a change in pull request #31340:
URL: https://github.com/apache/spark/pull/31340#discussion_r566166649



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/ObjectHashAggregateExec.scala
##########
@@ -74,12 +74,17 @@ case class ObjectHashAggregateExec(
 
   override lazy val metrics = Map(
     "numOutputRows" -> SQLMetrics.createMetric(sparkContext, "number of output 
rows"),
-    "aggTime" -> SQLMetrics.createTimingMetric(sparkContext, "time in 
aggregation build")
+    "aggTime" -> SQLMetrics.createTimingMetric(sparkContext, "time in 
aggregation build"),
+    "spillSize" -> SQLMetrics.createSizeMetric(sparkContext, "spill size"),
+    "fallBackToSortBasedAgg" -> SQLMetrics.createMetric(sparkContext,

Review comment:
       The name is a bit misleading, as the fallback happens only once for each 
task. Probably `numTasksFallBacked`?

##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/ObjectHashAggregateExec.scala
##########
@@ -74,12 +74,17 @@ case class ObjectHashAggregateExec(
 
   override lazy val metrics = Map(
     "numOutputRows" -> SQLMetrics.createMetric(sparkContext, "number of output 
rows"),
-    "aggTime" -> SQLMetrics.createTimingMetric(sparkContext, "time in 
aggregation build")
+    "aggTime" -> SQLMetrics.createTimingMetric(sparkContext, "time in 
aggregation build"),
+    "spillSize" -> SQLMetrics.createSizeMetric(sparkContext, "spill size"),
+    "fallBackToSortBasedAgg" -> SQLMetrics.createMetric(sparkContext,

Review comment:
       The name is a bit misleading, as the fallback happens only once for each 
task. Probably `numTasksFallBacked` or `numTasksSpilled`?




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

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