Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[SPARK-28599][SQL] Fix Execution Time and Duration column sorting…
… for ThriftServerSessionPage

This PR add support sorting `Execution Time` and `Duration` columns for `ThriftServerSessionPage`.

Previously, it's not sorted correctly.

Yes.

Manually do the following and test sorting on those columns in the Spark Thrift Server Session Page.
```
$ sbin/start-thriftserver.sh
$ bin/beeline -u jdbc:hive2://localhost:10000
0: jdbc:hive2://localhost:10000> create table t(a int);
+---------+--+
| Result  |
+---------+--+
+---------+--+
No rows selected (0.521 seconds)
0: jdbc:hive2://localhost:10000> select * from t;
+----+--+
| a  |
+----+--+
+----+--+
No rows selected (0.772 seconds)
0: jdbc:hive2://localhost:10000> show databases;
+---------------+--+
| databaseName  |
+---------------+--+
| default       |
+---------------+--+
1 row selected (0.249 seconds)
```

**Sorted by `Execution Time` column**:
![image](https://user-images.githubusercontent.com/5399861/65387476-53038900-dd7a-11e9-885c-fca80287f550.png)

**Sorted by `Duration` column**:
![image](https://user-images.githubusercontent.com/5399861/65387481-6e6e9400-dd7a-11e9-9318-f917247efaa8.png)

Closes #25892 from wangyum/SPARK-28599.

Authored-by: Yuming Wang <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
  • Loading branch information
wangyum authored and amanomer committed Sep 23, 2019
commit da43acc29a1fe93a1f4cf2a72c87ed0dbb6e4fe3
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ private[ui] class ThriftServerSessionPage(parent: ThriftServerTab)
<td>{info.groupId}</td>
<td>{formatDate(info.startTimestamp)}</td>
<td>{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)}
Expand Down