martin-g commented on code in PR #1686:
URL: 
https://github.com/apache/datafusion-ballista/pull/1686#discussion_r3219565788


##########
ballista/scheduler/src/api/handlers.rs:
##########
@@ -729,14 +728,14 @@ fn get_running_stage_time(task_infos: 
&[Option<TaskInfo>], current_time: u128) -
         .filter(|t| *t > 0)
         .min();
 
+    let time = Time::new();
     match (min_start, current_time) {
         (Some(start), end) if end > start => {
-            let t = Time::new();
-            t.add_duration(Duration::from_millis((end - start) as u64));
-            t.to_string()
+            time.add_duration(Duration::from_millis((end - start) as u64));
         }
-        _ => "0".to_string(),

Review Comment:
   Or maybe the field type should be `Option<u64>` and None telling the client 
that it is unavailable yet. 



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to