From f1ee7fa04fd7629257a79059fdcf8ec08c189feb Mon Sep 17 00:00:00 2001 From: Xingbo Jiang Date: Sat, 3 Feb 2018 23:24:53 -0800 Subject: [PATCH 1/2] fix NPE in sql executions page. --- .../apache/spark/sql/execution/ui/AllExecutionsPage.scala | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sql/core/src/main/scala/org/apache/spark/sql/execution/ui/AllExecutionsPage.scala b/sql/core/src/main/scala/org/apache/spark/sql/execution/ui/AllExecutionsPage.scala index 7019d98e1619f..3dd6dd9f3033e 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/execution/ui/AllExecutionsPage.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/execution/ui/AllExecutionsPage.scala @@ -179,7 +179,7 @@ private[ui] abstract class ExecutionTable( } private def descriptionCell(execution: SQLExecutionUIData): Seq[Node] = { - val details = if (execution.details.nonEmpty) { + val details = if (execution.details != null) { +details ++ @@ -190,8 +190,10 @@ private[ui] abstract class ExecutionTable( Nil } - val desc = { + val desc = if (execution.description != null) { {execution.description} + } else { + {execution.executionId} }
{desc} {details}
From 383ec1c4c60ca3c85c8eb4391a593377c68f778a Mon Sep 17 00:00:00 2001 From: Xingbo Jiang Date: Mon, 5 Feb 2018 10:37:17 -0800 Subject: [PATCH 2/2] add nonEmpty check --- .../org/apache/spark/sql/execution/ui/AllExecutionsPage.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/core/src/main/scala/org/apache/spark/sql/execution/ui/AllExecutionsPage.scala b/sql/core/src/main/scala/org/apache/spark/sql/execution/ui/AllExecutionsPage.scala index 3dd6dd9f3033e..e751ce39cd5d7 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/execution/ui/AllExecutionsPage.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/execution/ui/AllExecutionsPage.scala @@ -179,7 +179,7 @@ private[ui] abstract class ExecutionTable( } private def descriptionCell(execution: SQLExecutionUIData): Seq[Node] = { - val details = if (execution.details != null) { + val details = if (execution.details != null && execution.details.nonEmpty) { +details ++ @@ -190,7 +190,7 @@ private[ui] abstract class ExecutionTable( Nil } - val desc = if (execution.description != null) { + val desc = if (execution.description != null && execution.description.nonEmpty) { {execution.description} } else { {execution.executionId}