erenavsarogullari commented on a change in pull request #28208:
URL: https://github.com/apache/spark/pull/28208#discussion_r412499313
##########
File path:
sql/core/src/main/scala/org/apache/spark/status/api/v1/sql/SqlResource.scala
##########
@@ -84,18 +119,40 @@ private[v1] class SqlResource extends BaseAppResource {
}
val duration = exec.completionTime.getOrElse(new Date()).getTime -
exec.submissionTime
- val planDetails = if (details) exec.physicalPlanDescription else ""
- val metrics = if (details) printableMetrics(exec.metrics,
exec.metricValues) else Seq.empty
+ val planDetails = if (details && planDescription)
exec.physicalPlanDescription else ""
+ val metrics =
+ if (details) printableMetrics(exec.metrics, exec.metricValues,
nodeIdAndWSCGIdMap)
+ else Seq.empty
new ExecutionData(
exec.executionId,
status,
exec.description,
planDetails,
- metrics,
new Date(exec.submissionTime),
duration,
running,
completed,
- failed)
+ failed,
+ metrics)
}
+
+ private def getNodeIdAndWSCGIdMap(graph: SparkPlanGraph): Map[Long,
Option[Long]] = {
Review comment:
`WholeStageCodegenId` is being parsed through WSCG `nodeName`. This adds
the protection at parsing level if it fails due to invalid WSCG `nodeName`. I
think this `optional` protection can still be useful even if invalid
`wholeStageCodegenId` points less cases.
----------------------------------------------------------------
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]