cloud-fan commented on a change in pull request #27260: [SPARK-30549][SQL] Fix the subquery shown issue in UI When enable AQE URL: https://github.com/apache/spark/pull/27260#discussion_r368424177
########## File path: sql/core/src/main/scala/org/apache/spark/sql/execution/ui/SQLAppStatusListener.scala ########## @@ -344,6 +344,18 @@ class SQLAppStatusListener( update(exec) } + private def onAdaptiveAccumUpdates(event: SparkListenerSQLAdaptiveAccumUpdates): Unit = { + val SparkListenerSQLAdaptiveAccumUpdates(executionId, accumIdsToMetricType) = event + + val stages = liveExecutions.get(executionId).stages + accumIdsToMetricType.map { case (accumulatorId, metricType) => + stages.foreach { stageId => + val liveStageMetric = stageMetrics.get(stageId) + liveStageMetric.accumIdsToMetricType += (accumulatorId -> metricType) Review comment: It's too hacky to make a UI data class mutable. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org