zhanqian-1993 commented on code in PR #7927:
URL: https://github.com/apache/dolphinscheduler/pull/7927#discussion_r851074053


##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskInstanceServiceImpl.java:
##########
@@ -200,4 +205,28 @@ public Result queryTaskListPaging(User loginUser,
         }
         return result;
     }
+
+    @Override
+    public Result<Object> queryRankExecuteTime(User loginUser, long 
projectCode, Integer top, ExecutionStatus stateType, String startTime, String 
endTime) {
+        Result result = new Result();
+        Project project = projectMapper.queryByCode(projectCode);
+        //check user access for project
+        Map<String, Object> checkResult = 
projectService.checkProjectAndAuth(loginUser, project, projectCode);
+        Status status = (Status) checkResult.get(Constants.STATUS);
+        if (status != Status.SUCCESS) {
+            putMsg(result,status);
+            return result;
+        }
+
+        String orderBy = "";
+        if (driverClassName.contains("postgresql")) {

Review Comment:
   Unified sql needs to avoid using different database dateTime function.  It's 
seem have to add a column named 'duration'  of table 't_ds_task_instance' and 
maintain it when update 'end_time'. 
   I'll figurate out all related interface and maintain the 'duration' column.



-- 
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]

Reply via email to