wangxj3 commented on a change in pull request #7491:
URL: https://github.com/apache/dolphinscheduler/pull/7491#discussion_r774920185



##########
File path: 
dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_postgre.sql
##########
@@ -1015,6 +1017,7 @@ CREATE TABLE t_ds_task_group (
    name        varchar(100) DEFAULT NULL ,
    description varchar(200) DEFAULT NULL ,
    group_size  int NOT NULL ,
+   project_code bigint DEFAULT '0' ,

Review comment:
       this table is empty ,because this function is never be used.

##########
File path: 
dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_mysql.sql
##########
@@ -1051,7 +1053,7 @@ CREATE TABLE `t_ds_task_group` (
    `group_size` int (11) NOT NULL COMMENT'group size',
    `use_size` int (11) DEFAULT '0' COMMENT 'used size',
    `user_id` int(11) DEFAULT NULL COMMENT 'creator id',
-   `project_id` int(11) DEFAULT NULL COMMENT 'project id',

Review comment:
       this function haven't been used 

##########
File path: 
dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/TaskGroupQueueMapper.xml
##########
@@ -117,4 +123,32 @@
         where task_id = #{taskId}
     </select>
 
+    <select id="queryTaskGroupQueueByTaskGroupIdPaging" 
resultType="org.apache.dolphinscheduler.dao.entity.TaskGroupQueue">
+        select
+            queue.id, queue.task_name, queue.group_id, queue.process_id, 
queue.priority, queue.status
+             , queue.force_start, queue.create_time, queue.update_time,
+               process.name as processInstanceName,p.name as 
projectName,p.code as projectCode
+        from t_ds_task_group_queue queue
+            left join t_ds_process_instance process on queue.process_id = 
process.id
+            left join t_ds_process_definition p_f on 
process.process_definition_code = p_f.code
+                                                         and 
process.process_definition_version = p_f.version
+            join t_ds_project as p on p_f.project_code = p.code

Review comment:
       If the user does not have project permissions, the data cannot be 
displayed, so this logic is fine  




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