You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/03/22 07:45:04 UTC
[GitHub] [spark] martin-g commented on a change in pull request #35884: [SPARK-38579][SQL][WEBUI]Requesting Restful API can cause NullPointerException
martin-g commented on a change in pull request #35884:
URL: https://github.com/apache/spark/pull/35884#discussion_r831854998
##########
File path: sql/core/src/main/scala/org/apache/spark/status/api/v1/sql/SqlResource.scala
##########
@@ -94,7 +94,8 @@ private[v1] class SqlResource extends BaseAppResource {
val duration = exec.completionTime.getOrElse(new Date()).getTime - exec.submissionTime
val planDetails = if (planDescription) exec.physicalPlanDescription else ""
- val nodes = if (details) printableMetrics(graph.allNodes, exec.metricValues) else Seq.empty
+ val nodes = if (details) printableMetrics(graph.allNodes,
+ Option(exec.metricValues).getOrElse(Map())) else Seq.empty
Review comment:
```suggestion
Option(exec.metricValues).getOrElse(Map.empty)) else Seq.empty
```
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org