This is an automated email from the ASF dual-hosted git repository. srowen pushed a commit to branch branch-2.4 in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-2.4 by this push: new bc78f98 [SPARK-29053][WEBUI][2.4] Sort does not work on some columns bc78f98 is described below commit bc78f989cf88b96bc1e7c629dc1947f3457c1376 Author: aman_omer <amanomer1...@gmail.com> AuthorDate: Mon Sep 23 08:37:49 2019 -0500 [SPARK-29053][WEBUI][2.4] Sort does not work on some columns ### What changes were proposed in this pull request? Setting custom sort key for duration and execution time column. ### Why are the changes needed? Sorting on duration and execution time columns consider time as a string after converting into readable form which is the reason for wrong sort results as mentioned in [SPARK-29053](https://issues.apache.org/jira/browse/SPARK-29053). ### Does this PR introduce any user-facing change? No. ### How was this patch tested? Test manually. Back-port of commit 93ac4e1b2df5ca1dde29010320c6faead537a7b1 Closes #25882 from amanomer/BP29053. Authored-by: aman_omer <amanomer1...@gmail.com> Signed-off-by: Sean Owen <sean.o...@databricks.com> --- .../apache/spark/sql/hive/thriftserver/ui/ThriftServerPage.scala | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/ui/ThriftServerPage.scala b/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/ui/ThriftServerPage.scala index 771104c..8b3f2e3 100644 --- a/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/ui/ThriftServerPage.scala +++ b/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/ui/ThriftServerPage.scala @@ -90,7 +90,8 @@ private[ui] class ThriftServerPage(parent: ThriftServerTab) extends WebUIPage("" <td>{info.groupId}</td> <td>{formatDate(info.startTimestamp)}</td> <td>{if (info.finishTimestamp > 0) formatDate(info.finishTimestamp)}</td> - <td>{formatDurationOption(Some(info.totalTime))}</td> + <td sorttable_customkey={info.totalTime.toString}> + {formatDurationOption(Some(info.totalTime))}</td> <td>{info.statement}</td> <td>{info.state}</td> {errorMessageCell(detail)} @@ -155,7 +156,8 @@ private[ui] class ThriftServerPage(parent: ThriftServerTab) extends WebUIPage("" <td> <a href={sessionLink}> {session.sessionId} </a> </td> <td> {formatDate(session.startTimestamp)} </td> <td> {if (session.finishTimestamp > 0) formatDate(session.finishTimestamp)} </td> - <td> {formatDurationOption(Some(session.totalTime))} </td> + <td sorttable_customkey={session.totalTime.toString}> + {formatDurationOption(Some(session.totalTime))} </td> <td> {session.totalExecution.toString} </td> </tr> } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org