This is an automated email from the ASF dual-hosted git repository.

yao pushed a commit to branch branch-3.3
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-3.3 by this push:
     new b77e7ef2f19 [SPARK-45749][CORE][WEBUI] Fix `Spark History Server` to 
sort `Duration` column properly
b77e7ef2f19 is described below

commit b77e7ef2f19b113afa8417ed4caa51e41667fabd
Author: Dongjoon Hyun <dh...@apple.com>
AuthorDate: Wed Nov 1 09:55:45 2023 +0800

    [SPARK-45749][CORE][WEBUI] Fix `Spark History Server` to sort `Duration` 
column properly
    
    ### What changes were proposed in this pull request?
    
    This PR aims to fix an UI regression at Apache Spark 3.2.0 caused by 
SPARK-34123.
    
    From Apache Spark **3.2.0** to **3.5.0**, `Spark History Server` cannot 
sort `Duration` column.
    
    After this PR, Spark History Server can sort `Duration` column properly 
like Apache Spark 3.1.3 and before.
    
    ### Why are the changes needed?
    
    Before SPARK-34123, Apache Spark had the `title` attribute for sorting.
    - https://github.com/apache/spark/pull/31191
    ```
    <td><span title="{{durationMillisec}}">{{duration}}</span></td>
    ```
    
    Without `title`, `title-numeric` doesn't work.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No. This is a bug fix.
    
    ### How was this patch tested?
    
    Manual test. Please use `Safari Private Browsing ` or `Chrome Incognito` 
mode.
    
    <img width="96" alt="Screenshot 2023-10-31 at 5 47 34 PM" 
src="https://github.com/apache/spark/assets/9700541/8c8464d2-c58b-465c-8f98-edab1ec2317d";>
    
    <img width="94" alt="Screenshot 2023-10-31 at 5 47 29 PM" 
src="https://github.com/apache/spark/assets/9700541/03e8373d-bda3-4835-90ad-9a45670e853a";>
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No.
    
    Closes #43613 from dongjoon-hyun/SPARK-45749.
    
    Authored-by: Dongjoon Hyun <dh...@apple.com>
    Signed-off-by: Kent Yao <y...@apache.org>
    (cherry picked from commit f72510ca9e04ae88660346de440b231fc8225698)
    Signed-off-by: Kent Yao <y...@apache.org>
---
 core/src/main/resources/org/apache/spark/ui/static/historypage.js | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/core/src/main/resources/org/apache/spark/ui/static/historypage.js 
b/core/src/main/resources/org/apache/spark/ui/static/historypage.js
index b334bceb5a0..68dc8ba316d 100644
--- a/core/src/main/resources/org/apache/spark/ui/static/historypage.js
+++ b/core/src/main/resources/org/apache/spark/ui/static/historypage.js
@@ -192,7 +192,12 @@ $(document).ready(function() {
           },
           {name: startedColumnName, data: 'startTime' },
           {name: completedColumnName, data: 'endTime' },
-          {name: durationColumnName, type: "title-numeric", data: 'duration' },
+          {
+            name: durationColumnName,
+            type: "title-numeric",
+            data: 'duration',
+            render:  (id, type, row) => `<span 
title="${row.durationMillisec}">${row.duration}</span>`
+          },
           {name: 'user', data: 'sparkUser' },
           {name: 'lastUpdated', data: 'lastUpdated' },
           {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to